# 2006 iTest Problems/Problem U3

The following problem is from the Ultimate Question of the 2006 iTest, where solving this problem required the answer of a previous problem. When the problem is rewritten, the T-value is substituted.

## Problem

When properly sorted, $9$ math books on a shelf are arranged in alphabetical order from left to right. An eager student checked out and read all of them. Unfortunately, the student did not realize how the books were sorted, and so after finishing the student put the books back on the shelf in a random order. If all arrangements are equally likely, the probability that exactly $6$ of the books were returned to their correct (original) position can be expressed as $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Compute $m + n$.

## Solution

The total number of ways to arrange nine books is $9!$. Now we need to determine the number of arrangements where exactly six books were in the right location.

The number of ways to select six books of the nine is $\tbinom{9}{6}$. Let those six books be in the right location. Therefore, none of the three remaining books can be in the right location, and there are $2$ ways that could happen.

Thus, the probability that exactly $6$ books are in the right location is $\frac{9 \cdot 8 \cdot 7 \cdot 2}{3 \cdot 2 \cdot 9!} = \frac{1}{3 \cdot 6!} = \frac{1}{2160}$, so $m+n = \boxed{2161}$.