Say we have 198 people who can be seated across 30 tables. Each table can sit 7, 6 or 5 people.
We don't care about the order of people within a table, and we don't care about the order of the tables, so a change to either of those won't represent a new valid combination. Any move of an individual outside of their table constitutes a new valid combination.
How many combinations can we have?
I need to code this into Python and am struggling to express it.
My working so far is:
There are 7 different grouping combinations of 5,6 and 7 to make 198.
For each grouping combination we need to move person 1 to available seat 1 then move person 2 to each available seat and for each available seat for person 2 we move person 3 to each available seat etc etc it cascades.
However my understanding is that it would be diminishing cascade as person n increases, the more people have been sat for that combination and therefore the number of remaining available seats decreases. Does this miss anything?
Our aim is to find out how many partitions $\mathcal P$ of set $[198]$ exist such that $\mathcal P$ has $30$ elements and that each of them is a set that has $7,6$ or $5$ elements.
If $a,b,c$ stand for number of tables where $7,6,5$ persons sit respectively then $a,b,c$ are nonnegative integers that satisfy:
From this we deduce that $b+2c=12$ and based on this we find the following $7$ candidates for $(a,b,c)$:
$(24,0,6),(23,2,5),(22,4,4),(21,6,3),(20,8,2),(19,10,1),(18,12,0)$
Each of them gives rise to a collection of partitions that has the properties that are described above.
Let $(a,b,c)$ denote one of the $7$ candidates. The number of possibilities to split up set $[198]$ into $a$ sets of $7$, $b$ sets of $6$ and $c$ sets of $5$ elements equals:$$\frac{198!}{(7!)^a(6!)^b(5!)^c}$$
These numbers must be found for each of the $7$ candidates and their summation is our final answer.