[Math] In how many ways can eight people, denoted $A,B,C,D,E,F,G,H$ be seated about a square table that seats two people on each side

combinatoricsdiscrete mathematics

In how many ways can eight people, denoted $A,B,C,D,E,F,G,H$ be seated about a square table that seats two people on each side?

My approach:

Since each side of the table seats two people, there are $2$ possible arrangements for two people sitting on a side (for example, $AB$ and $BA$). Given $8$ people, there are $8!$ ways to arrange them, and to avoid over counting rotations, we have $\frac{8!}{8}$ ways to arrange $8$ people around the table. So we have a total possible arrangements of
$$2*\left(\frac{8!}{8}\right)=\frac{8!}{4}=10,080.$$


If two of the eight people, say $A$ and $B$, do not get along well, how many different seatings are possible with $A$ and $B$ not sitting next to each other?

My approach:

There are two cases to consider by which $A$ is next to $B$, the first case $AB$ and the second case $BA$ (but they don't have to be on the same side of the square when this happens). These two cases give us $2*6!$ possible arrangements.


Is my approach to these problems correct? My approach to the second one feels incomplete, or even incorrect. As there must be a two step process, as I must find the number of arrangements by which the condition is met and also avoid over counting the rotations.

Best Answer

Consider the complement: how many ways can they be seated such that $A$ and $B$ must sit next to each other? Well, imagine gluing the couple together as a single superperson $\boxed{AB}$. Note that we could also permute the two people within the superperson, so there are $2!$ ways to do this. Next, we must now permute the $7$ people, giving us $7!$ possibilities. But because a square can be rotated four times, we overcounted by a factor of $4$. Putting everything together and subtracting from the result from the first problem, we obtain: $$ \frac{8!}{4} - \frac{2!7!}{4} = \frac{8 \cdot 7! - 2 \cdot 7!}{4} = \frac{6 \cdot 7!}{4} = \frac{3 \cdot 7!}{2} = 7560 $$