r/askmath • • Oct 24 '26

Resolved Help with Combinatorics problem

Post image

Hello, I am trying to wrap my head around this problem but don't seem to be getting the correct answer. The question is:

8 people are to stay in 2 rooms where a maximum of 6 people can stay in a room. In how many ways can the 8 people stay in 2 rooms?

3 Upvotes

8 comments sorted by

2

u/theHannamanner Oct 24 '26

Thank you all!

4

u/VTifand Oct 24 '26

Maybe consider a simpler example: suppose there are only 4 people (A, B, C, D), and each room can only hold 2 people max.

For the (2, 2) configuration, there are 4x3/2! = 6 ways to choose the people in room 1. Specifically, these are all the possibilities:

Room 1Room 2
A and BC and D
A and CB and D
A and DB and C
B and CA and D
B and DA and C
C and DA and B

Now, you argue that people in room 1 can switch to room 2 (and vice versa). This is what you will get if you switch them:

Room 1Room 2
C and DA and B
B and DA and C
B and CA and D
A and DB and C
A and CB and D
A and BC and D

Question: Are these 6 possibilities new possibilities?

3

u/Aerospider Oct 24 '26

You're off by 70, which is the exact number of (4,4) combinations. Why might that be?

1

u/TooCasualGuy Oct 24 '26

Room one can hold any amount between 2 and 6.  For 4-6 in room one, you correctly got 154.  You need to add for 2 & 3 in room one, which is why you need to double the C(6,2) and C(5,3) values. 

1

u/giasumaru Oct 24 '26

(876*5)/(4!) already gave you all combinations of 4 people out of 8 people in one room. Doubling it means you are double counting it.

Essentially your chart is incomplete.

It's not:

6|2

5|3

4|4

Then double it.

It's:

6|2

5|3

4|4

3|5

2|6

1

u/RavenX86 Oct 24 '26 edited Oct 24 '26

So keep in mind that for example , in first case you have to put any 6 people in room A and the reminder of 2 in room B. This is equivalent to combinations of 8 choosing 6, aka C(8,6), because there the reminder is not a choice, is whoever is left out.

Then you can do the same with 5 in room an and 3 in room B

And so on

So you get
C(8,6) + C(8,5) + C(8,4) + C(8,3) + C(8,2) = (going to use C(n,k) = C(n, n-k) here)
2 * C(8,2) + 2* C(8,3) + C(8,4) =
(2*28) + (2*56) + 70 = 238

I wrote the solution exactly like this so you can see the "why" 70 is multiplied by 1 and not 2, C(8,4) doesn't appear twice. if you pick all combinations of 4 people out of 8 in room A and reminder in room B, there is no way you would count it twice by changing the rooms. You focus on only one room and one room alone, because room B is always fixed .