Permutations and Combinations

Permutations vs. combinations

A permutation is an arrangement where order matters; a combinationis a selection where it doesn't. The number of ways to arrange all nn distinct items is n!n! (n factorial): n!=n×(n−1)×⋯×2×1n! = n \times (n-1) \times \cdots \times 2 \times 1.

Worked example: the 19th word in dictionary order

If all permutations of the letters of the word MASK are arranged in dictionary order, which one is the 19th word?

Solution: Sort the letters alphabetically first: A, K, M, S. There are 4!=244! = 24 total arrangements. Group them by starting letter: each group has 3!=63! = 6 words, since the remaining 3 letters can be arranged 6 ways:

  • Words 1–6 start with A
  • Words 7–12 start with K
  • Words 13–18 start with M
  • Words 19–24 start with S

The 19th word is the first word starting with S. Arranging the remaining letters (A, K, M) in alphabetical order gives SAKM.

Continue learning

Counting the total number of outcomes in a probability problem is often exactly this kind of permutation or combination count.