Permutation describes one specific ordering of the elements in a set. In other words, if you have a collection of distinct items, a permutation is a particular sequence that lists those items in a chosen order. The concept is widely used in mathematics and in many applied fields such as computer science and statistics.

Definition and basic idea

Think of a permutation as an arrangement or lineup. For a given set of objects, each different arrangement counts as a different permutation. Swapping the positions of two items produces a different permutation; similarly, moving an item to a new position while shifting others yields another permutation.

Counting permutations

If there are n distinct objects, the total number of possible permutations of all n objects is n factorial, written n!, which equals 1·2·3·…·n. For example, three distinct items can be ordered in 3! = 6 different ways.

When some objects are identical, the number of distinct permutations is smaller. If n items include groups of identical objects of sizes n1, n2, ..., nk (with n1 + n2 + … + nk = n), the number of distinct orderings is

n! / (n1! n2! … nk!),

because permutations that only swap identical items do not create new, distinguishable arrangements.

Common examples

  • Seating arrangements: the different ways people can sit in fixed seats around a table or in a car are permutations of the people.
  • Words and letters: different orderings of letters form different strings; for example, the letters A, B, C have six permutations: ABC, ACB, BAC, BCA, CAB, CBA.

Additional notes

  • A simple swap of two elements is called a transposition. Any permutation can be built as a sequence of transpositions.
  • There are multiple ways to represent a permutation: as a list showing the image of each position, or in cycle notation, which groups elements according to how they are moved among positions.