Generating Permutations by a Sequence of Transpositions

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

The permutations of the set are generated here by starting with this set and successively applying transpositions. At each step the largest element moves back and forth across the other elements, pausing for one step at each end. In the pauses the other elements also move back and forth and also pause. This sequence of permutations can be generated by the Johnson–Trotter algorithm. The list of transpositions used here is constructed by recursion.

Contributed by: George Beck (March 2011)
Open content licensed under CC BY-NC-SA



[1] D. Stanton and D. White, Constructive Combinatorics, New York: Springer–Verlag, 1986.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.