A simplified loop-free algorithm for generating permutations

Nachum Dershowitz*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

A simple loop-free algorithm for generation of all permutations of a set of elements is presented and its validity is proved. It is a simplification of Ehrlich's loop-free version of Johnson and Trotter's algorithm. Each permutation is generated by exchanging two adjacent elements of the preceding permutation. A very simple data structure obviates the need for looping during the generation of each successive permutation.

Original languageEnglish
Pages (from-to)158-164
Number of pages7
JournalBIT
Volume15
Issue number2
DOIs
StatePublished - Jun 1975
Externally publishedYes

Keywords

  • loop-free algorithms
  • ordering
  • permutation generation
  • permutations
  • permutations and combinations

Fingerprint

Dive into the research topics of 'A simplified loop-free algorithm for generating permutations'. Together they form a unique fingerprint.

Cite this