Lehmer code: Difference between revisions

Content deleted Content added
Article permutation currently in line with this one
Removed a reference wich was actually a spam (link to a page selling table and chairs)
Tag: references removed
Line 13:
at position ''i'' similarly signifies a right-to-left maximum, and that the Lehmer code of ''σ'' coincides with the [[factorial number system]] representation of its position in the list of permutations of ''n'' in lexicographical order (numbering the positions starting from 0).
 
Variations of this encoding can be obtained by counting inversions (''i'',''j'') for fixed ''j'' rather than fixed ''i'', by counting inversions with a fixed smaller ''value'' {{math|''σ''<sub>''j''</sub>}} rather than smaller index ''i'', or by counting non-inversions rather than inversions; while this does not produce a fundamentally different type of encoding, some properties of the encoding will change correspondingly. In particular counting inversions with a fixed smaller value {{math|''σ''<sub>''j''</sub>}} gives the inversion table of ''σ'', which can be seen to be the Lehmer code of the inverse permutation.<ref>{{cite web|title=Inversion table|url=http://inversionhelps.com/compare/}}</ref>
 
==Encoding and decoding==