In how many ways can a residence director assign six students to four dormitory rooms if two rooms are doubles and two rooms are singles ,and two of the students cannot be placed together?
Well, without the restriction on the students who cannot be polaced together, there are 6.5/2 ways of placing students in the first double room, 4.3/2 of placing the remainder in the other double, 2 ways of placing the next student in the first single and then 1 way of placing the last student in the other single, giving 6.5.4.3.2.1/2.2
However, we need to count how many ways the forbidden pair go together. If they are in the first double, there are 4.3/2 times 2 times 1 ways of placing the rest: if in the second double, the same again. So 2.4.3.2.1/2 are forbidden.
The answer is then 180-24 = 156.