|
|
A123400
|
|
Infinite string related to Ehrlich's swap method for generating permutations.
|
|
3
|
|
|
1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 2, 3, 1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 2, 4, 3, 1, 3, 1, 3, 2, 1, 3, 1, 3, 1, 2, 3, 1, 3, 1, 3, 2, 1, 3, 1, 3, 1, 4, 2, 3, 2, 3, 2, 1, 3, 2, 3, 2, 3, 1, 2, 3, 2, 3, 2, 1, 3, 2, 3, 2, 3, 4, 1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 2, 3, 1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 2, 4, 3, 1, 3, 1, 3, 2, 1, 3, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
In the successive permutations in star-transposition order a(n) is the position of the element swapped with the first element at step n; equivalently, the value swapped with 0 in the inverse permutation. - Joerg Arndt, Dec 25 2023
The first 24 values (plus 1, as [2, 3, 2, 3, 2, 4, 3, 2, 3, 2, 3, 4, 2, 3, 2, 3, 2, 4, 3, 2, 3, 2, 3, 5]) are given on the last page of the Kompel'makher/Liskovets reference. - Joerg Arndt, Jan 17 2024
|
|
REFERENCES
|
D. E. Knuth, TAOCP, Section 7.2.1.2.
|
|
LINKS
|
|
|
EXAMPLE
|
permutation swap inverse permutation
0: [ 0 1 2 3 ] [ 0 1 2 3 ]
1: [ 1 0 2 3 ] (0, 1) [ 1 0 2 3 ]
2: [ 2 0 1 3 ] (0, 2) [ 1 2 0 3 ]
3: [ 0 2 1 3 ] (0, 1) [ 0 2 1 3 ]
4: [ 1 2 0 3 ] (0, 2) [ 2 0 1 3 ]
5: [ 2 1 0 3 ] (0, 1) [ 2 1 0 3 ]
6: [ 3 1 0 2 ] (0, 3) [ 2 1 3 0 ]
7: [ 0 1 3 2 ] (0, 2) [ 0 1 3 2 ]
8: [ 1 0 3 2 ] (0, 1) [ 1 0 3 2 ]
9: [ 3 0 1 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