Teacher X, Y, Z and 6 students sitting in a row. How many ways can the teachers choose their seats so that there are no 2 adjacent teachers?
I know that you can solve it by: (s) = student. We put 1 student in between XY and YZ to satisfy the condition
(s) X (s) Y (s) Z (s) then using stars and bars to solve $a+b+c+d=4$ then multiplying by 3! because X,Y,Z can be arranged we have: $7C3 * 3!$ or $35*3!$
Now I tried with Inclusion Exclusion,
Choosing any 3 in the 9 spots $9C3$ , This includes the set with at least 1 adjacent pair of teachers.
To get the number of ways for at least 1 adjacent pair of teachers, we pair 2 of them at the start, so we have to choose 2 slots in 8 objects. $8C2$. But $9C3 -8C2$ = 56. So I don't know what I didn't count
Say $A$ is a set where $X,Y$ are together nad similary for $B$ and $C$. Then you need $$|U| -|A\cup B\cup C|$$ where $U$ is a set of all confiugration, so $|U| = 9!$. Then $$|A| = |B|=|C| = 2\cdot 8!$$ and $$|A\cap B| = |B\cap C| = |C\cap A |= 2\cdot 7!$$ and $|A\cap B\cap C| = 0$. Now use the PIE.