Four teachers decide to swap desks at work. How many ways can this be done if no teacher is to sit at their previous desk?
Let teacher 1 originally occupy desk 1, teacher 2 originally occupy desk 2 and etc.
There are 3 ways this can happen, since we have 3 other teachers.
Now, without loss of generality, assume that teacher 2 occupies desk 1.
Case 1: Teacher 1 occupies desk 2.
Then, teacher 3 must occupy desk 4 and vice versa, so this case can only happen 1 way.
Case 2: Either one of teachers 3 or 4 occupy desk 2. Note that there are 2 ways this can happen, since we have 2 other teachers.
Then, without further loss of generality, assume that teacher 3 occupies desk 2.
Subcase 2.1: Teacher 1 occupies desk 3.
This can't happen, because then teacher 4 occupies their own desk.
Subcase 2.2: Teacher 4 occupies desk 3.
Then teacher 1 must occupy desk 4. Only 1 way this can happen.
\[ \therefore \text{Ans: }3\big(1 + 2(0+1) \big) = 9.\]
____________________________________________________________
The total outcomes is just the number of ways the teachers can be assigned to sit anywhere, which is just 4! = 24.
The inclusion-exclusion principle becomes necessary because we double count the number of ways more than 1 teacher can sit at their own seat.
# of ways at least 1 sits at their own seat = 4 * 3! (choose 1 out of 4 teachers, force them to sit at their own desk, and then let the others sit anywhere)
# of ways at least 2 sit at their own seat = 6 * 2! (choose 2 out of 4 teachers, force them to sit at their own desk, and then let the others sit anywhere)
# of ways at least 3 sit in their own seat = 4 * 1! (choose 3 out of 4 teachers, force them to sit at their own desk, and let the last one sit anywhere. Of course, that happens to be their own seat anyway, but the inclusion/exclusion principle is just designed to work like this.)
# of ways all 4 sit in their own seat = 1.
\[ \therefore \text{Ans: }4! - 4\times3! + 6\times2! - 4\times1! + 1 =9.\]