# In how many ways can an inspector visit $4$ normal sites and $1$ "suspicious" one?

I cannot figure out why my answer to the following question is wrong:

Suppose that a weapons inspector must inspect each of five different sites twice, visiting one site per day. The inspector is free to select the order in which he visits these sites, but cannot visit site $X$, the most suspicious site, on two consecutive days. In how many ways can the inspector visit these sites?

The set of sites is $$S=\{a, a, b, b, c, c, d, d, X, X \}$$

The set of sites where the inspector visits $X$ on consecutive days is $$R=\{a, a, b, b, c, c, d, d, (X, X) \}$$

My idea is to do $$\text{number of distinguishable permutations of S}-\text{number of distinguishable permutations of R}$$

$$\dfrac {10!}{2! \cdot 2! \cdot 2! \cdot 2!\cdot 2!}-\dfrac {9!}{2! \cdot 2! \cdot 2! \cdot 2! \cdot 1!}$$

However, the right answer is $90,720$. Any help is appreciated!

• It looks right to me! Maybe I am making the same error? Commented Jun 22, 2016 at 16:12
• What's the right answer? Maybe that could lead people to a solution. Commented Jun 22, 2016 at 16:14
• @Arthur It should not, because in the second case you are treating the the set of two visits to site $X$ as one object. Commented Jun 22, 2016 at 16:15
• @Stefan4024 It's 90,720, I've updated the question too
– Ovi
Commented Jun 22, 2016 at 16:15
• @Ovi Are you sure that you computed your expression correctly? It evaluates to 90720. Commented Jun 22, 2016 at 16:16

Your answer looks OK. Simplifying a little: $$\dfrac {10!}{2! \cdot 2! \cdot 2! \cdot 2!\cdot 2!}-\dfrac {9!}{2! \cdot 2! \cdot 2! \cdot 2! \cdot 1!} = \left(\frac{10}{2}-1\right)\frac{9!}{2^{4}} = 4\cdot\frac{9!}{16} = \frac{9!}{4}$$
Using a different approach, consider placing the low priority sites in order: $$\frac{8!}{2! \cdot 2! \cdot 2! \cdot 2!}$$
Then the bad site visits slot into the $9$ "gaps" in ${9\choose 2}$ ways: $$\frac{8!}{2! \cdot 2! \cdot 2! \cdot 2!}{9\choose 2} = \frac{8!}{16} \cdot\frac{9\cdot8}{2} =\frac{9!}{4}$$
The answer in the OP, $\dfrac {10!}{2! \cdot 2! \cdot 2! \cdot 2!\cdot 2!}-\dfrac {9!}{2! \cdot 2! \cdot 2! \cdot 2! \cdot 1!}$, correctly evaluates to $90, 720$. I had repeatedly made a computation mistake when evaluating this, which led me to believe it was wrong.