CombinatoricsDifficulty 5.5AIME, harderFind the answer
For any positive integer n,Sn be the set of all permutations of \{1,2,3, \ldots, n\}. For each permutation π∈Sn, let f(π) be the number of ordered pairs (j,k) for which π(j)>π(k) and 1≤j<k≤n. Further define g(π) to be the number of positive integers k≤n such that π(k)≡k±1(modn). Compute π∈S999∑(−1)f(π)+g(π)
A number or a short expression. Spacing and $ signs are ignored.
Solution
Define an n×n matrix An(x) with entries ai,j=x if i≡j±1(modn) and 1 otherwise. Let F(x)=∑π∈Sn(−1)f(π)xg(π) (here (−1)f(π) gives the sign∏u−vπ(u)−π(v) of the permutation π). Note by construction that F(x)=det(An(x)). We find that the eigenvalues of An(x) are 2x+n−2 (eigenvector of all ones) and (x−1)(ωj+ωj−1), where ωj=en2πji, for 1≤j≤n−1. Since the determinant is the product of the eigenvalues, F(x)=(2x+n−2)2n−1(x−1)n−1k=1∏n−1cos(n2πk) Evaluate the product and plug in x=−1 to finish. (As an aside, this approach also tells us that the sum is 0 whenever n is a multiple of 4.)
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.