Maths Olympiad Prep

Library / /585 of 860

Combinatorics Difficulty 5.3 AIME, harder Find the answer

Let S7S_{7} denote all the permutations of 1,2,,71,2, \ldots, 7. For any \pi \in S_{7},let, let f(\pi)bethesmallestpositiveinteger be the smallest positive integer isuchthatπ(1),π(2),,π(i) such that \pi(1), \pi(2), \ldots, \pi(i) is a permutation of 1,2,,i1,2, \ldots, i. Compute \sum_{\pi \in S_{7}} f(\pi)$.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Extend the definition of ff to apply for any permutation of 1,2,,n1,2, \ldots, n, for any positive integer nn. For positive integer nn, let g(n)g(n) denote the number of permutations \piof of 1,2, \ldots, nsuchthat such that f(\pi)=n.Wehave. We have g(1)=1.Forfixed. For fixed n, k(with (with k \leq n),thenumberofpermutationsπ ), the number of permutations \pi of 1,2,,n1,2, \ldots, n such that f(π)=kf(\pi)=k is g(k)(nk)g(k)(n-k) !. This gives us the recursive formula g(n)=g(n)= n!k=1n1g(k)(nk)n!-\sum_{k=1}^{n-1} g(k)(n-k) !. Using this formula, we find that the first 7 values of gg are 1,1,3,13,71,461,34471,1,3,13,71,461,3447. Our sum is then equal to \sum_{k=1}^{7} k \cdot g(k)(7-k)!.Usingourcomputedvaluesof !. Using our computed values of g$, we get that the sum evaluates to 29093 .

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.