document.write( "Question 1210182: A permutation of the numbers (1,2,3,\dots,n) is a rearrangement of the numbers in which each number appears exactly once. For example, (2,5,1,4,3)$ is a permutation of (1,2,3,4,5).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Let \pi = (x_1,x_2,x_3,\dots,x_n) be a permutation of the numbers (1,2,3,\dots,n). A fixed point of \pi is an integer k, 1 \le k \le n, such that x_k = k. For example, 4 is a fixed point of the permutation (2,5,1,4,3).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "How many permutations of (1,2,3,4,5,6,7) have at least four fixed point?
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #851499 by CPhill(1959)\"\" \"About 
You can put this solution on YOUR website!
Let's break down this problem systematically.\r
\n" ); document.write( "\n" ); document.write( "**Understanding Fixed Points**\r
\n" ); document.write( "\n" ); document.write( "A fixed point in a permutation is a position where the number in that position is the same as the position number. For example, in the permutation (2, 1, 3, 5, 4), the number 3 is in the 3rd position, so 3 is a fixed point.\r
\n" ); document.write( "\n" ); document.write( "**Counting Permutations with at Least Four Fixed Points**\r
\n" ); document.write( "\n" ); document.write( "We need to count the permutations of (1, 2, 3, 4, 5, 6, 7) that have 4, 5, 6, or 7 fixed points.\r
\n" ); document.write( "\n" ); document.write( "* **7 Fixed Points:**
\n" ); document.write( " * There is only one permutation with 7 fixed points: (1, 2, 3, 4, 5, 6, 7).
\n" ); document.write( " * Number of permutations: 1\r
\n" ); document.write( "\n" ); document.write( "* **6 Fixed Points:**
\n" ); document.write( " * If 6 points are fixed, the remaining number must also be fixed.
\n" ); document.write( " * Therefore, there are no permutations with exactly 6 fixed points.
\n" ); document.write( " * Number of permutations: 0\r
\n" ); document.write( "\n" ); document.write( "* **5 Fixed Points:**
\n" ); document.write( " * If 5 points are fixed, the remaining two numbers must be swapped.
\n" ); document.write( " * There are $\binom{7}{5}$ ways to choose the 5 fixed points.
\n" ); document.write( " * The remaining two numbers must be swapped, so there is only 1 way to arrange them.
\n" ); document.write( " * Number of permutations: $\binom{7}{5} = \frac{7!}{5!2!} = \frac{7 \cdot 6}{2} = 21$\r
\n" ); document.write( "\n" ); document.write( "* **4 Fixed Points:**
\n" ); document.write( " * There are $\binom{7}{4}$ ways to choose the 4 fixed points.
\n" ); document.write( " * The remaining 3 numbers must be permuted so that none of them are in their original positions (derangements).
\n" ); document.write( " * The number of derangements of 3 items, denoted as D(3), is calculated as:
\n" ); document.write( " * D(3) = 3! (1 - 1/1! + 1/2! - 1/3!) = 6 (1 - 1 + 1/2 - 1/6) = 6 (1/3) = 2
\n" ); document.write( " * Number of permutations: $\binom{7}{4} \times D(3) = \frac{7!}{4!3!} \times 2 = \frac{7 \cdot 6 \cdot 5}{3 \cdot 2 \cdot 1} \times 2 = 35 \times 2 = 70$\r
\n" ); document.write( "\n" ); document.write( "**Total Permutations**\r
\n" ); document.write( "\n" ); document.write( "Now, we add up the counts for each case:\r
\n" ); document.write( "\n" ); document.write( "* Total permutations = 1 + 0 + 21 + 70 = 92\r
\n" ); document.write( "\n" ); document.write( "**Therefore, there are 92 permutations of (1, 2, 3, 4, 5, 6, 7) that have at least four fixed points.**
\n" ); document.write( "
\n" ); document.write( "
\n" );