I'm writing a program to brute-force a schedule for my job based on restrictions and certain parameters. To see if brute-forcing the schedule is even feasible, I decided to first calculate the total possible number of schedules based on the parameters:
nEmployees- The number of employeesnShifts- The number of shifts required per daynDays- The total number of days in the rotation to calculate for
For the sake of simplicity, and to get the worst-case-scenario, I'm not exluding from the calculation schedules that violate labour laws, or are otherwise impossible (like having one person work every shift for the entire rotation).
For our situation specifically, here are the parameters I want to use:
nEmployees= 18nShifts= 6nDays= 90
Thinking back to this subject from years ago, my first thought was to just multiply all the numbers together. This only gave me 9720 though, which seems very low; intuitively, I was expecting a much higher number.
Then I realized that if I recall correctly, this gives me the number of schedules where order doesn't matter. The order of the days does matter though, but it doesn't make any sense for the order of shifts or people to matter; Person1 working Shift1 and Person2 working Shift2 is the same as Person2 working Shift2 and Person1 working Shift1.
I think this leaves me with something like $nDays^{nShifts*nEmployees}$ (from memory). That gives me a massive result though, so I hope that's incorrect.
Is this the correct formula?