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.
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: .$\displaystyle 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 $\displaystyle 9$ derangements. **
Then the four pairs can be assigned rooms in $\displaystyle 4!$ ways.
Answer: .$\displaystyle 9\cdot4! \:=\:216$ ways.
** You can count them if you like . . . $\displaystyle \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}$
@Soroban.Please check my solution.
Number of ways to put the $\displaystyle 8$ students in $\displaystyle 4$ rooms such that there are $\displaystyle 2$ students in every room$\displaystyle =\dbinom{8}{2}\times\dbinom{6}{2}\times\binom{4}{2 }=28\times15\times6=2520.$
Let $\displaystyle A_i$ denote the property that the$\displaystyle i$th room contains students of the same school.
$\displaystyle 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})$.
$\displaystyle n(A_{1})=\binom{4}{1}\times\big( \binom{6}{2}\times \binom{4}{2}\times 1\big)=4\times 90=360$.
Therefore,$\displaystyle \sum n(A_{i})=360\times 4=1440$
$\displaystyle n(A_{1}\cap A_{2})=\dbinom{4}{2} \times 2! \times \dbinom{4}{2} =72$. Therefore,$\displaystyle \sum n(A_{i}\cap A_{j})=\dbinom{4}{2} \times 72=432$
$\displaystyle n(A_{1}\cap A_{2}\cap A_{3})=\dbinom {4}{3}\times 3!=24$.Therefore,$\displaystyle \sum n(A_{i}\cap A_{j}\cap A_{k})=24=24$
$\displaystyle n(A_{1}\cap A_{2}\cap A_{3}\cap A_{4})=4!=24$
$\displaystyle n(A_1\cup A_2\cup A_3\cup A_4)=1440-432+24-24=1008$
Thus required number of ways=$\displaystyle 2520-n(A_1\cup A_2\cup A_3\cup A_4)=2520-1008=1512$
I want to make a slight correction
$\displaystyle \sum n(A_{i}\cap A_{j}\cap A_{k})=4\times 24=96$
Thus $\displaystyle \ n(A_{1}\cup A_{2}\cup A_{3}\cup A_{4})=1440-432+96-24=1080$
Finally,required number of ways=$\displaystyle 2520-1080=1440$