# Combinatorics, 72 groups of 4.

I’m doing an exercise where I simulate a cohort of 288 students and sort them into different groups. For one of the questions, my task is to place the entire cohort into 72 groups of 4, simulating their homework groups. Using code I’ve done this easily enough, however, I’m having trouble with the follow-up question. It asks how many different ways of sorting the 288 students into these 72 groups exist.

My immediate thought was to use the multinomial coefficient, I got a very large answer: $${n\choose n_1,n_2,…,n_{72}}= \frac{n!}{n_1!n_2!…n_{72}!}= \frac{288!}{(4!)^{72}}\approx 3.03\times 10^{485}$$ using wolframAlpha’s calculator. I’m unsure of whether this is the answer my lecturers are looking for or whether I’ve made a mistake somewhere. The follow-up questions ask for probabilities of specific events with trivially small answers due to the large sample space of choices. I’d appreciate any help with this or points in the right direction. Maybe I’m just overthinking and it is supposed to be that large.

Edit: Some useful comments have helped me realise that my answer is true if the order of the groups themselves matters. The question itself is slightly ambiguous on this point as it doesn't mention how we should treat the groups, however, given the fact that the groups are numbered and are simulating groups of students who take simulated tests, I am assuming that the order of said groups does indeed matter.

Also, I should clarify what I meant when I spoke about the follow-up questions. One such question goes "What is the probability that a student ends up in the exact same homework group (one of the 72 groups of 4) as the other people from their report group (report group: a separate group formed by splitting the cohort into 16 groups of 18(labs), then, and within these labs, students are further split into 6 groups of 3, which are labelled 'A to F' and exist within each lab)?"

For this follow-up question, as each report pod has 3 members, 2 not including the student in question, then, each homework group that satisfies the condition in the question must contain the entire report pod and then there are 285 candidates for the fourth member. I thought that the number of ways we could choose a homework group in this way was $$288*285$$ - 288 candidates for the student in question and then there are only 285 further choices to make given we fix the report pod into the homework group. Then, assuming each way of choosing the homework groups is equally likely, I deduce the probability of the event as $$\frac{82080}{3.03\times 10^{485}}$$ which is extremely small.

The final follow-up asks what the expected number of students in one of the groups of 18 with at least one fellow student from their homework group(one of the 72 groups of 4, chosen independently of the other groups) that was also in their report pod(a group of 3 students within the same group of 18.

As you can see, near-zero probabilities don't help me much when dealing with the second follow-up, unless I'm just calculating the probability itself in the completely wrong way. However, I'm not sure how else to think about it.

Thank you!

• Are the groups numbered in advance? If not, then you should also divide by $72!$, which still leaves you with a big number of course.
– lulu
Jan 29 at 17:07
• Yes, the groups are numbered 1-72 as I have to specify which group a student belongs to in the data frame as well. Thank You! Jan 29 at 17:27
• You should edit your post to clarify that point. That's not at all clear from what you wrote. But, if the groups are numbered, then your calculation is correct.
– lulu
Jan 29 at 17:35
• To be clear though, the fact that you record the groups isn't really the point. Say we had $8$ students and you wanted to group them in groups of $4$. Would you say that $(s_1, s_2, s_3,s_4)\,\&\,(s_5, s_6, s_7, s_8)$ is different from $(s_5, s_6, s_7, s_8)\,\&\,(s_1, s_2, s_3,s_4)$ or are those two divisions the same?
– lulu
Jan 29 at 17:37
• "The follow up questions ask for probabilities of specific events which have trivially small answers..." It may be worth being more specific about these events. There are plenty of events that are easy to ask about for which the probabilities will be quite high relatively speaking... for instance "John Smith and Jane Doe are two students in the class. What is the probability they are grouped together?" to which the answer should be $\dfrac{3}{287}$ Jan 29 at 18:25

One way to solve this problem is as follows.

We arrange the students in a row. The first four students make the first group, the next four form the second group and so on.

The number of distinct ways in which $$288$$ students can be arranged in a row is $$288!$$.

But because the ordering of students within a group is immaterial (a group containing $$S_1$$, $$S_2$$, $$S_3$$, and $$S_4$$ is the same as that containing $$S_2$$, $$S_3$$, $$S_4$$, and $$S_1$$), we need to divide the result above by $$(4!)^{72}$$. $$^*$$

So the number of ways in which $$288$$ students can be made into $$72$$ groups of $$4$$ is $$\frac{288!}{(4!)^{72}}$$. That is if the order of the groups matters.

For example, {$$S_1$$, $$S_2$$, $$S_3$$, $$S_4$$} being the first group and {$$S_5$$, $$S_6$$, $$S_7$$, $$S_8$$} being the second is different from {$$S_5$$, $$S_6$$, $$S_7$$, $$S_8$$} being the first and {$$S_1$$, $$S_2$$, $$S_3$$, $$S_4$$} being the second.

However, if this order doesn't matter, we will need to further divide our result by $$72!$$ because that's the number of ways in which $$72$$ groups can be arranged among themselves.

So the number of ways in which $$288$$ students can be made into $$72$$ groups of four is $$\frac{288!}{(4!)^{72} \cdot 72!}$$, if the order of the groups doesn't matter.

$$^*$$ Members in one group can be arranged in 4! ways and there are $$72$$ groups.

There needs to be clarity whether the groups are labeled/numbered, e.g. #1, #2, #3, ...#72

If not, you need to divide by $$72!$$ because the position of a group in the line of $$72$$ would not create a different division
To be absolutely clear, suppose there were only two groups of $$4$$, your answer is correct only if $$abcd\mid efgh$$ is different from $$efgh\mid abcd$$
• To be absolutely clear, supoose there were only two groups of $4$. your answer is correct only if $abcd\mid efgh$ is different from $efgh \mid abcd$ Jan 29 at 18:04
• In your dataFrame, you need to give a number for each group. But for a specific student, which is the number of his group is not interesting, the only useful information is the name of the 3 other students in his group. So $\frac{288!}{(4!)^{72}\times 72!}$ is definitely the right answer. Jan 30 at 14:54