How many arrangements are there of A,B,C,D,E,F if B follows immediately after A or D immediately after C or F immediately after E ?
Here is my solution:
let $A1$ be the set where B is immediately after A,
let $A2$ be the set where D is immediately after C,
let $A3$ be the set where F is immediately after E,
Then $$N(Ai) = 5!$$ $$N(AiAj) = 4!$$$$N(AiAjAk) = 3!$$
And $N(A1\bigcup A2\bigcup A3)$ = C(3,1)5! - C(3,2)4! + C(3,3)3!
Is there an easier way to do this? I tried to use a generating function, could not get it to work.