Skip to content

MinimalInversionsEitherDirection on Permutation ​

The smaller of the number of inversions and the number of non-inversions.

On Permutation

Inversions of p against those of its reverse.

Called as CombinatorialStat(x, "MinimalInversionsEitherDirection"). The head's page has its examples.

Live

Distribution

Over SymmetricGroup at each size, tallied here in your browser; sizes past 8 are not offered.

FindStat St001511

The minimal number of transpositions needed to sort a permutation in either direction.

ObjectValue
[1]0
[1,2]0
[2,1]0
[1,2,3]0
[1,3,2]1
[2,1,3]1
[2,3,1]1
[3,1,2]1

Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St001511 has the rest.