Variations with and without Repetition
A variation (ordered selection) of k objects chosen from n is a sequence in which the order matters; without repetition there are V(n, k) = n!/(n − k)! of them, and with repetition there are nk. In brief: the podium (gold, silver, bronze) of a race with 8 runners can be filled in 8 · 7 · 6 = 336 ways, and a 4-digit PIN in 104 = 10,000 ways. If the order does not matter, the count is a combination, which is smaller.
A variation is the answer to the question “in how many ways can we choose k objects in order?” The only decisions are whether the objects can be reused (repetition) and whether the order matters. This guide derives the two formulas from the multiplication principle, shows how to decide which one to use, handles problems with extra conditions and gives a table of values for n = 6, with a comparison of variations, permutations and combinations.
What are variations without repetition?
From n distinct objects, choose k of them and arrange them in a row, with no object used twice. There are n choices for the first position, n − 1 for the second, …, and n − k + 1 for the k-th. By the multiplication principle:
V(n, k) = n(n − 1)⋯(n − k + 1) = n!/(n − k)!, for 0 ≤ k ≤ n.
The case k = n is the number of permutations n!. In some books V(n, k) is written P(n, k), nPk or Ank.
Example 1: a podium
8 runners, 3 medals: V(8, 3) = 8 · 7 · 6 = 336.
Example 2: a committee with roles
From 10 members, a president, a vice-president and a treasurer: V(10, 3) = 10 · 9 · 8 = 720.
Example 3: three-letter words
Three-letter “words” with distinct letters from the 26-letter alphabet: V(26, 3) = 26 · 25 · 24 = 15,600.
What are variations with repetition?
If each position can be filled by any of the n objects, independently of the other positions, there are n choices for each of the k positions: nk variations with repetition.
Example 4: PIN codes
A 4-digit PIN (digits 0–9): 104 = 10,000. If digits may not repeat: V(10, 4) = 10 · 9 · 8 · 7 = 5,040.
Example 5: true–false test
A test with 10 true–false questions has 210 = 1,024 possible answer sheets. The chance of guessing all correctly is 1/1,024 ≈ 0.1%.
Example 6: words over an alphabet
Words of length 5 over the 4 DNA bases A, C, G, T: 45 = 1,024.
Example 7: functions between sets
The number of functions from a set with k elements to a set with n elements is nk (each of the k inputs has n possible outputs), and the number of one-to-one functions is V(n, k). For k = 3, n = 5: 125 functions, of which 60 are one-to-one.
How do you decide which formula to use?
- Does the order matter? If not, use combinations.
- If the order matters, can the same object be chosen again? If yes: nk. If no: n!/(n − k)!.
- If all objects are used (k = n) and none repeated: n!.
Typical wording: “arrange”, “code”, “password”, “word”, “ranking” suggests that the order matters. “Select a team”, “choose a subset”, “a hand of cards” suggests that it does not.
How do you count with extra conditions?
Example 8: numbers with distinct digits
How many 4-digit numbers have all digits different? The first digit: 9 choices (1–9). Then the remaining three positions get the remaining 9 digits (including 0) without repetition: V(9, 3) = 9 · 8 · 7 = 504. Total: 9 · 504 = 4,536.
Example 9: at least one repetition
How many 4-digit PINs have at least one repeated digit? Total 10,000 minus those with all distinct digits (5,040): 4,960.
Example 10: a fixed position
How many 5-letter codes using A–Z without repetition start with a vowel (A, E, I, O, U) and end with a consonant? The first letter: 5 choices. The last letter: 21 consonants. The middle three letters: V(24, 3) = 24 · 23 · 22 = 12,144. The total is 5 · 21 · 12,144 = 1,275,120.
Example 11: finding k or n from the count
V(n, 2) = 90 means n(n − 1) = 90, so n2 − n − 90 = 0, (n − 10)(n + 9) = 0, so n = 10. And nk = 243 for n = 3 gives k = 5.
Table of variation counts for n = 6
| k | Without repetition V(6, k) | With repetition 6k | Combinations C(6, k) |
|---|---|---|---|
| 0 | 1 | 1 | 1 |
| 1 | 6 | 6 | 6 |
| 2 | 30 | 36 | 15 |
| 3 | 120 | 216 | 20 |
| 4 | 360 | 1,296 | 15 |
| 5 | 720 | 7,776 | 6 |
| 6 | 720 | 46,656 | 1 |
Each combination C(n, k) corresponds to k! variations: V(n, k) = C(n, k) · k!. For n = 6, k = 3: 20 · 6 = 120 ✓.
Where do these counts come from?
The counting of ordered selections is found in medieval Hebrew and Arabic works about the permutations of letters, and in Indian prosody. Systematic combinatorics was developed by Pascal, Fermat and Leibniz in the seventeenth century. Leibniz used the Latin term variationes in his 1666 Dissertatio de arte combinatoria, from which the word variation comes.
Where are they used today?
The number of possible passwords, PINs, licence plates and telephone numbers is computed with variations with repetition. Cryptographers measure the strength of a password by the size of the search space: 8 characters from 94 printable symbols give 948 ≈ 6.1 × 1015 possibilities. Rankings in sport and in elections, and the number of possible orders in a schedule, use variations without repetition.
Which mistakes are common?
Using variations when the order does not matter
Choosing a team of 3 from 10 is C(10, 3) = 120, not V(10, 3) = 720. Variations count each team 3! = 6 times.
Forgetting that the first digit cannot be 0
For numbers (not codes), handle the first position separately.
Mixing up n and k
In nk, the base is the number of options per position and the exponent is the number of positions. Telephone codes of 3 digits: 103, not 310.
Using factorial formulas when k > n
Without repetition, you cannot choose more objects than you have: V(n, k) = 0 for k > n.