# 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

## Snapshots

## Details

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

## Permanent Citation

"Generating Permutations by a Sequence of Transpositions"

http://demonstrations.wolfram.com/GeneratingPermutationsByASequenceOfTranspositions/

Wolfram Demonstrations Project

Published: March 7 2011