I have been presented with a fairly basic counting problem with forbidden positions as follows:
A carousel has eight seats, each representing a different animal. Eight boys are seated on the carousel but facing inward, so that each boy faces another (each boy looks at another boy’s front). In how many ways can the boys change seats so that each faces a different boy?
The first three steps I've worked out and are fairly basic, accomplished by treating the boys as four pairs {a1, a2}, {b1, b2}, {c1, c2}, and {d1, d2}.
- Total possibilities = 8! (seats are distinct, so no rotationally equivalent permutations exist)
- Forbidden possibilities with at least one pair = $C(4, 1) * P(4, 1) * 2 * 6!$ (choose the pair to stay facing, choose an opposing pair of seats, permute the pair across the two seats, and permute the remaining 6 boys)
- Forbidden possibilities with at least two pairs = $C(4, 2) * P(4, 2) * 2^2 * 4!$ (choose two facing pairs, permute across four pairs of seats, permute each pair, and permute the remaining 4 boys)
Clearly, the answer (with minor simplification) begins with $8! - 32 * 6! + 288 * 4!$ and to this point the provided solution agrees.
At this point, however, the solution strikes me as strange because it goes on to count the number of solutions with three pairs as well as the solutions with four pairs, and adds those terms into the Inclusion/Exclusion equation. This seems incorrect because the permutations with at least three matching sets should be exactly the same as the permutations with exactly four matching sets - if you place each of pairs a, b, and c in facing seats, the only seats left available for pair d are facing as well. In effect, the expected $C(4, 3)$ term to select the three opposing pairs ought to be left out entirely; since any selection of three pairs to be opposing automatically makes the fourth pair opposing, all of these selections are identical for practical purposes.
Therefore, while the provided solution has the final equation $$8! - 32*6! + 288*4! - 768*2! + 384$$ the solution I worked out is $$8! - 32*6! + 288*4! - 384$$
Can someone please explain the flaw in my reasoning? Thanks.
Here is some additional information which might be helpful to clarify the situation. First of all two aspects.
This statement is correct and in fact here is no problem at all. The interesting part is earlier in the text, namely
The wording at least contains the crucial information. When calculating all forbidden possibilities with at least one pair we count also configurations with two and more pairs.
So, already in these steps forbidden possibilities with three pairs and four pairs are somehow considered, typically overcounted resp. undercounted and this fact has to be respected in the further steps.
We analyse the situation with respect to overcounting and undercounting elements when performing the steps (1) to (4) step by step. We partition the set according to these steps, take a representative from the single subsets, from the intersection of two subsets, etc. and mark in each step how often the representatives are counted.
Column 1 Situation after step (1): $$|E|-|A|-|B|-|C|-|D|$$
Elements which are in $A$ but not in any other subset are subtracted exactly once, indicated by $-1$ in the first row. Here we can stop. Nothing more to do with these elements.
Elements which are in $A\cap B$ but not in any other subset are subtracted twice, since they are subtracted by $|A|$ and also by $|B|$, indicated by $-2$ in the second row. So, these elements are undercounted by one.
Elements which are in $A\cap B\cap C$ but not in $D$ are subtracted three times, namely in $|A|, |B|$ and $|C|$. These elements are undercounted by two, indicated by $-3$ in the third row.
Elements which are in $A\cap B\cap C \cap D$ are subtrated four times, namely in $|A|, |B|, |C|$ and $|D|$. These elements are undercounted by three, indicated by $-4$ in the fourth row.
Column 2 Situation after step (2): \begin{align*} &|E|-|A|-|B|-|C|-|D|\\ &\qquad+|AB|+|AC|+|AD|+|BC|+|BD|+|CD| \end{align*}
Elements which are in $A\cap B$ but not in any other subset are added exactly once and the compensation for (1) is done.
Elements which are in $A\cap B\cap C$ but not in $D$ are added three times, namely in $|AB|, |AC|$ and $|BC|$. These elements are now overcounted by one, indicated by $0$.
Elements which are in $A\cap B\cap C \cap D$ are added six times, namely in $|AB|, |AC|, |AD|, |BC|, |BD|$ and $|CD|$. These elements are overcounted by three, indicated by $+2$.
Column 3 Situation after step (3):
\begin{align*} &|E|-|A|-|B|-|C|-|D|\\ &\qquad+|AB|+|AC|+|AD|+|BC|+|BD|+|CD|\\ &\qquad-|ABC|-|ABD|-|ACD|-|BCD| \end{align*}
Elements which are in $A\cap B\cap C$ but not in $D$ are subtracted exactly once and the compensation for (2) is done.
Elements which are in $A\cap B\cap C \cap D$ are subtracted four times, namely in $|ABC|, |ABD|, |ACD|$ and $|BCD|$. These elements are undercounted by one, indicated by $-2$.
Column 4 Situation after step (4):
\begin{align*} &|E|-|A|-|B|-|C|-|D|\\ &\qquad+|AB|+|AC|+|AD|+|BC|+|BD|+|CD|\\ &\qquad-|ABC|-|ABD|-|ACD|-|BCD|\\ &\qquad+|ABCD| \end{align*}
$$ $$