Permutations & Combinations
Scenario
Picking a 4-digit UPI PIN (where order matters — 1234 is different from 4321) vs picking 3 friends for a Goa trip (where Alice-Bob-Carol is the same group as Carol-Bob-Alice).
How do you count the right number of possibilities without listing them all?
Mental model
Permutation = arrange (order matters). Combination = choose (order doesn't).
If swapping two items creates a new valid outcome (password 123 vs 321), it's a Permutation. If swapping changes nothing (team of Alice+Bob is the same team both ways), it's a Combination. nCr = nPr / r! because combinations kill the r! duplicate orderings.
Formula
nPr = n! / (n-r)! (arrange r from n). nCr = n! / (r! x (n-r)!) (choose r from n). Repeated items: arrange n items where one group of p is identical, another q is identical -> n! / (p! x q!). Circular arrangements: (n-1)! for distinct items around a circle.
nCr = nC(n-r) by symmetry — choosing r to include is the same as choosing (n-r) to exclude. For repeated items, divide by the factorial of each repeated group's size.
Worked example
Problem: How many distinct arrangements can be made from the letters of the word GOOGLE?
- Set up: GOOGLE has 6 letters. Check for repeats: G appears 2 times, O appears 2 times, L and E appear once each.
- Formula: arrangements with repeats = n! / (p! x q! x ...) = 6! / (2! x 2!) (for the two G's and two O's).
- Compute: 6! = 720. 2! x 2! = 2 x 2 = 4. Total = 720 / 4 = 180.
- Sanity-check: Two repeated groups each halve the count. Starting from 720, halve twice gives 720/4 = 180. Makes sense.
Answer: 180 distinct arrangements.
Problem: A team of 4 is to be formed from 5 men and 4 women such that there is exactly 1 woman. How many ways?
- Set up: Need 1 woman AND 3 men. Order within the team doesn't matter (team, not lineup).
- Count women choices: 4C1 = 4.
- Count men choices: 5C3 = 5! / (3! x 2!) = (5 x 4) / 2 = 10.
- Combine (AND = multiply): 4C1 x 5C3 = 4 x 10 = 40.
- Sanity-check: Total ways to pick 4 from 9 = 9C4 = 126. 40 out of 126 is plausible for the 1-woman restriction.
Answer: 40 ways.
Shortcuts
- nCr Complement Rule: nCr = nC(n-r). If r > n/2, flip it to make calculation easier. (100C98 = 100C2 = (100 x 99) / 2 = 4950. Done in 3 seconds.)
- AND vs OR in Counting: 'AND' (both conditions true) = multiply the counts. 'OR' (either condition) = add the counts. (3 shirt choices AND 4 pants choices = 3 x 4 = 12 outfits. Red shirt OR blue shirt = 1 + 1 = 2 choices.)
Common mistakes
- Using Permutation instead of Combination: Selecting a committee of 3 from 10 people requires 10C3. Many mistakenly use 10P3, which assumes the 3 people have distinct roles.
- Forgetting to divide for repeated items: MOON has 2 O's. Arrangements = 4!/2! = 12, not 4! = 24. Every pair of arrangements that only differ in swapping the two O's is actually one arrangement.
Glossary
- symmetry
- When two things perfectly balance or mirror each other.
- factorial
- Multiplying a number by every whole number smaller than it down to 1.
- outcomes
- The final results or possibilities from a situation.
Recall questions
- What is the formula for nCr?
- How many distinct arrangements of the letters in MOON?
- Is selecting a committee a permutation or combination problem?
Questions & answers
How many words can be formed using the letters of the word 'AMAZON'?
360
Approach: 6 letters, A repeats 2 times. Arrangements = 6! / 2! = 720 / 2 = 360.
A team of 4 is to be formed from 5 men and 4 women such that there is exactly 1 woman. How many ways?
40
Approach: 1 woman from 4 (4C1 = 4) AND 3 men from 5 (5C3 = 10). Multiply: 4 x 10 = 40.
Continue learning
Next: Probability