Generating Permutations by a Sequence of Transpositions

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.



  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


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

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Related Curriculum Standards

US Common Core State Standards, Mathematics