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 distinct items is (n factorial): .
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 total arrangements. Group them by starting letter: each group has 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.