n people standing in a line
Here is the question:
If Sam and Peter are among n men who are arranged at random in a line, what is the probability that exactly k men stand between them?
My solution:
1. Group Sam and Peter and the k men together and count them as one person.
2. So in effect, we have (n-k-2+1) number of people.
3. Simplify that and we get n-k-1
4. There are (n-k-1)! ways of arranging them.
5. There are then 2 more ways of arranging Sam and Peter by switching them around.
6. Finally, there are k! ways of arranging the k people between Sam and Peter
7. There are n! ways of arranging everyone without any restrictions.
8. Therefore the solution is:
(n-k-1)! * 2 * k! / n!
However, the book solution is 2*(n-k-1)/n*(n-1)
I checked by plugging some numbers and my answer is different from the book. Can someone explain what I'm missing?
Thanks