# Thread: Find number of ways

1. ## Find number of ways

There are 8 students from 4 different schools(2 from each school).In how many ways can these students be put in 4 different rooms(2 students in each room) so that no room contains students of the same school.

2. ## Re: Find number of ways

Originally Posted by pankaj
There are 8 students from 4 different schools(2 from each school).In how many ways can these students be put in 4 different rooms(2 students in each room) so that no room contains students of the same school.
There are $4!$ to assign the students from school $X$ to a different room.
What about the students from school $Y~?$

3. ## Re: Find number of ways

Hello, pankaj!

There are 8 students from 4 different schools (2 from each school).
In how many ways can these students be put in 4 different rooms (2 students in each room)
so that no room contains students of the same school.

Suppose the students are: . $A,A,B,B,C,C,D,D$
In how many ways can they partitioned into four unmatched pairs?

This is derangement of four objects.
There are $9$ derangements. **

Then the four pairs can be assigned rooms in $4!$ ways.

Answer: . $9\cdot4! \:=\:216$ ways.

** You can count them if you like . . . $\begin{array}{cccc}A&B&C&D \\ \hline B&A&D&C \\ C&A&D&B \\ D&A&B&C \\ B&D&A&C \\ C&D&A&B \\ D&C&A&B \\ B&C&D&A \\ C&D&B&A \\ D&C&B&A \end{array}$

4. ## Re: Find number of ways

Number of ways to put the $8$ students in $4$ rooms such that there are $2$ students in every room $=\dbinom{8}{2}\times\dbinom{6}{2}\times\binom{4}{2 }=28\times15\times6=2520.$

Let $A_i$ denote the property that the $i$th room contains students of the same school.
$n(A_1\cup A_2\cup A_3\cup A_4)=\sum n(A_{i})-\sum n(A_{i}\cap A_{j})+\sum n(A_{i}\cap A_{j}\cap A_{k})- n(A_{1}\cap A_{2}\cap A_{3}\cap A_{4})$.

$n(A_{1})=\binom{4}{1}\times\big( \binom{6}{2}\times \binom{4}{2}\times 1\big)=4\times 90=360$.

Therefore, $\sum n(A_{i})=360\times 4=1440$

$n(A_{1}\cap A_{2})=\dbinom{4}{2} \times 2! \times \dbinom{4}{2} =72$. Therefore, $\sum n(A_{i}\cap A_{j})=\dbinom{4}{2} \times 72=432$

$n(A_{1}\cap A_{2}\cap A_{3})=\dbinom {4}{3}\times 3!=24$.Therefore, $\sum n(A_{i}\cap A_{j}\cap A_{k})=24=24$

$n(A_{1}\cap A_{2}\cap A_{3}\cap A_{4})=4!=24$

$n(A_1\cup A_2\cup A_3\cup A_4)=1440-432+24-24=1008$

Thus required number of ways= $2520-n(A_1\cup A_2\cup A_3\cup A_4)=2520-1008=1512$

5. ## Re: Find number of ways

I want to make a slight correction

$\sum n(A_{i}\cap A_{j}\cap A_{k})=4\times 24=96$

Thus $\ n(A_{1}\cup A_{2}\cup A_{3}\cup A_{4})=1440-432+96-24=1080$

Finally,required number of ways= $2520-1080=1440$