Inversions in sequences: Difference between revisions

From testwiki
Jump to navigation Jump to search
imported>Watchduck
 
(No difference)

Latest revision as of 20:59, 12 October 2024

Inversion (discrete mathematics) Template:Rdrup

This page shows the 44 = 256 sequences of length 4 with possible entries from 0...3. These are the integers 0...255 in base 4.

It shows their place-based and element based inversion sets, and all four possible vectors related to them.
Template:Invvect and Template:Invvect are the left and right inversion counts, and Template:Invvect is the inversion vector. The fourth possible vector is unused, but added as Template:Invvect for completeness' sake.

While inversion sets and the related vectors uniquely define permutations, this is not true for sequences in general.

The place-based inversion sets are the same as those of permutations.
There are 35 sequences with the inversion set of permutation 0, while that of 23 is unique.
The inversion sets of the permutations 1, 2, 3, 4, 6, 8, 9, 12, 13, 16 and 18 appear 15 times each, while those of 5, 7, 10, 11, 14, 15, 17, 19, 20, 21 and 22 appear 5 times each.

The element-based inversion sets are multisets, as different pairs of places can have the same pair of elements.
There are 103 different multisets, corresponding to 40 different inversion vectors Template:Invvect.
So there are 40 − 24 = 16 inversion vectors that permutations can not have — e.g. (4, 0, 0, 0), (0, 3, 0, 0) and (0, 0, 2, 0).

Permutations

Place based inversion sets