Page 1 of 1

Number of n-element permutations with exactly k inversions

Posted: Sun Jan 30, 2005 9:08 pm
by tytus
How to find number of n-element permutations with exactly k inversions?? (n,k are given)

Posted: Thu Feb 03, 2005 2:46 pm
by cypressx
I know some solutions:
1.) Using Merge Sort ( the complexity is O(n log n) )
2.) Using DP ( this is the fastest algorithm for this problem that I have heard of )

Probably there exist a formula ?

Re: Number of n-element permutations with exactly k inversio

Posted: Sun Feb 06, 2005 10:39 pm
by nnahas
tytus wrote:How to find number of n-element permutations with exactly k inversions?? (n,k are given)
http://academic.csuohio.edu/bmargolius/ ... invers.htm