Heap's algorithm

Heap's algorithm

Heap's algorithm generates all possible permutations of n objects. It was first proposed by B. R. Heap in 1963. The algorithm minimizes movement: it generates each permutation from the previous one by interchanging a single pair of elements; the other n−2 elements are not disturbed. In a 1977 review of permutation-generating algorithms, Robert Sedgewick concluded that it was at that time the most effective algorithm for generating permutations by computer.

Comment
enHeap's algorithm generates all possible permutations of n objects. It was first proposed by B. R. Heap in 1963. The algorithm minimizes movement: it generates each permutation from the previous one by interchanging a single pair of elements; the other n−2 elements are not disturbed. In a 1977 review of permutation-generating algorithms, Robert Sedgewick concluded that it was at that time the most effective algorithm for generating permutations by computer.
Depiction
Heap algorithm with 4 elements.svg
Wheel diagram Heap's algorithm.svg
DifferentFrom
Heapsort
Has abstract
enHeap's algorithm generates all possible permutations of n objects. It was first proposed by B. R. Heap in 1963. The algorithm minimizes movement: it generates each permutation from the previous one by interchanging a single pair of elements; the other n−2 elements are not disturbed. In a 1977 review of permutation-generating algorithms, Robert Sedgewick concluded that it was at that time the most effective algorithm for generating permutations by computer. The sequence of permutations of n objects generated by Heap's algorithm is the beginning of the sequence of permutations of n+1 objects. So there is one infinite sequence of permutations generated by Heap's algorithm (sequence in the OEIS).
Is primary topic of
Heap's algorithm
Label
enHeap's algorithm
Link from a Wikipage to another Wikipage
Algorithm
Call stack
Category:Combinatorial algorithms
Category:Permutations
Divide-and-conquer algorithm
File:Heap algorithm with 4 elements.svg
File:Wheel diagram Heap's algorithm.svg
Null function
Parity (mathematics)
Permutation
Robert Sedgewick (computer scientist)
Sequence
Steinhaus–Johnson–Trotter algorithm
SameAs
Algorithme de Heap
Algoritmo de Heap
Algoritmo de Heap
egFj
Heap's algorithm
Heap-Algorithmus
Heapのアルゴリズム
m.0ztj467
Q16907296
الگوریتم هیپ
힙 알고리즘
Subject
Category:Combinatorial algorithms
Category:Permutations
Thumbnail
Heap algorithm with 4 elements.svg?width=300
WasDerivedFrom
Heap's algorithm?oldid=1091837226&ns=0
WikiPageLength
13259
Wikipage page ID
41437742
Wikipage revision ID
1091837226
WikiPageUsesTemplate
Template:Clarify
Template:Distinguish
Template:Math
Template:Mvar
Template:OEIS
Template:Reflist
Template:Short description