Asked by Me

How can I figure out how many inversions of permutations? I have the answers but I don't know how to get there.
Questions:
(1,2,3,4) has 0, (4,1,3,2) has 4 , and (4,3,2,1) has 6.

Answers

Answered by oobleck
An inversion in a permutation is a pair of numbers such that the larger number appears to the left of the smaller one in the permutation.

In (4,1,3,2) 4 is to the left of 1,2,3 and 3 is to the left of 2 -- 4 inversions

the others should now be clear.
Answered by Me
Thank you!
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions