Template:Steinhaus–Johnson–Trotter

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.