I have been looking at various programming problems and algorithms in an effort to improve my programming and problem solving skills. But, I keep running into description like this one:
"Let A = [a1,a2,...,an] be a permutation of integers 1,2,...,n. A pair of indices (i,j), 1<=i<=j<=n, is an inversion of the permutation A if ai>aj. We are given integers n>0 and k>=0. What is the number of n-element permutations containing exactly k inversions?" (SOURCE: http://www.spoj.pl/problems/PERMUT1/)
What kind of math do I need to study in order for this sort of problem description to make sense to me?