Inversion (discrete mathematics)

From Wikiversity
Jump to: navigation, search
Created by Watchduck.
Array of 2-subsets of an 8-set
(compare array OEISA018900)
The inversion vector shows the row sums of the inversion set.

An inversion is a pair of places of a permutation where the elements are out of their natural order.

The unique inversion set of a permutation is the set off all its inversions.
Its potential elements are all pairs of places, which can be arranged as a triangle.

The inversion vector shows the row sums of this triangle, usually with a leading zero.
It is a reflected factorial number, so it corresponds to an integer and is also unique.

The inversion number (OEISA034968 ) is the cardinality of the inversion set and the digit sum of the inversion vector.

Arrays of permutations[edit]

Odd evening, parted      OEISA211365      Loupe light.svg
Odd evening, alternating      OEISA211366      Loupe light.svg
Chains of transpositions      OEISA211367      Loupe light.svg
Rows of transpositions      OEISA211368      Loupe light.svg
Transpositions      OEISA211369      Loupe light.svg      (m,n) here corresponds to (n,m) in the array of 2-subsets.
Nested transpositions      OEISA100630      Loupe light.svg
Circular shift to the right      OEISA211370      Loupe light.svg
Circular shift to the left      OEISA051683      Loupe light.svg


These are two MATLAB scripts used to calculate the b-files (like this one for OEISA211366, created with the first script).
All other scripts were small modifications of these.
They use the function mat2seq_sym. The text file Bfile.txt had to be edited with find and replace.

Rdrdo.svg Walsh permutations[edit]

wp( 3, 5, 9, 1)
wp( 4, 8, 1, 2)
wp(14,13,11, 7)