I found this problem in the textbook Introductory Combinatorics, and am very confused by the answer provided by the text. Here is how I tried to solve it:
Define $P_{r,n}$ to be $r$-permutations of a set with $n$ elements.
Then there are, in total, $P_{9,7}$ $7$-permutations of our set. Considering the subset of permutations where $[5,6]$ occurs, in that order, there are $P_{8,7}$ such permutations, since we can treat $[5,6]$ as one element. Similarly for $[6,5]$.
Thus the solution must be $P_{9,7} – 2*P_{8,7} = 100800$. But the textbook instead breaks it down into 4 cases: (i) neither $5,6$ appear, (ii) both $5,6$ appear, $iii, iv$ one of the two appears. They find the answer $186,480$.
What is wrong with my reasoning that I got the solution wrong?
Best Answer
I see that what with your approach and the book's answer, there is confusion worse confounded. I don't see how cases can be avoided, so let's see case by case, calling numbers other than $5,6$ as "ordinary" and $5,6$ as "special"