Template:Steinhaus–Johnson–Trotter

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Steinhaus–Johnson–Trotter algorithm

Hamiltonian path in Cayley graph of S4
Hamiltonian path in permutohedron
Swapped elements are always adjacent.
Inversion vectors and inversion sets form a Gray code. Swapped elements correspond to the changing element of the inversion sets.