Permutations

Permutations list permutations of a set of integers

Permute permute a list given a permutation

SignaturePermutation sign or parity of a permutation

IdentityPermutation identity permutation of a given size

PermutationQ  ▪  LexicographicPermutations  ▪  MinimumChangePermutations

NextPermutation next permutation in lexicographic ordering

RankPermutation associate a permutation with a unique rank

InversePermutation  ▪  UnrankPermutation  ▪  RandomPermutation  ▪  Josephus

PermutationType type of a permutation

PermutationGraph graph for a permutation

NumberOfPermutationsByType  ▪  NumberOfPermutationsByCycles

SelectionSort sort a list given an ordering function

BinarySearch search a sorted list for a key

RandomHeap construct a random heap

Heapify  ▪  HeapSort

ToInversionVector inversion vector of a permutation

Inversions number of inversions

Index index of a permutation

FromInversionVector  ▪  Runs  ▪  Eulerian

NumberOfPermutationsByInversions

Involutions list permutations with cycles of length at most 2

Derangements list permutations leaving no element untouched

InvolutionQ  ▪  NumberOfInvolutions  ▪  DerangementQ  ▪  NumberOfDerangements