Sub topic 1
Counting Refresher: Permutations and Combinations
Most CAT probability questions are two counting problems in one. You count the outcomes you want, you count all the outcomes, and you divide. If the counting is wrong, nothing after it can be right. This chapter reviews the counting tools that the rest of the tutorial relies on, and it concentrates on the places where candidates lose marks.
Prerequisites
This chapter assumes you can already do the following:
- Work with fractions, ratios and percentages without a calculator.
- Simplify algebraic expressions, including cancelling common factors in a fraction.
- Read factorial notation. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120, and 0! = 1.
- Recognise a standard deck of 52 cards (4 suits of 13 ranks), a six-faced die and a coin.
You do not need any earlier probability. This is the first chapter.
The two basic principles
Every counting formula in this chapter comes from two rules.
Multiplication principle. If a task has several steps, and step 1 can be done in a ways, step 2 in b ways, and so on, then the whole task can be done in a × b × ... ways. Use it when the steps happen together (AND).
Addition principle. If a task can be done in one of several separate cases, with no overlap between cases, add the counts. Use it when the cases are alternatives (OR).
For example, a menu has 3 starters and 4 mains. A full meal is a starter and a main, so there are 3 × 4 = 12 meals. A student who instead picks one dessert from 5 cakes or 2 ice creams has 5 + 2 = 7 choices.
Permutations: order matters
A permutation is an arrangement of items in a definite order.
- All n distinct items in a row: n! ways.
- r items chosen from n distinct items and arranged in order: P(n, r) = n! / (n − r)!.
P(n, r) is the multiplication principle in disguise. The first position has n choices, the next has n − 1, and so on for r positions:
P(n, r) = n × (n − 1) × ... × (n − r + 1)
For example, the number of 3-letter codes from 5 distinct letters with no repeats is P(5, 3) = 5 × 4 × 3 = 60.
Arrangements with repeated items
If some items are identical, swapping them gives the same arrangement. Divide by the factorial of each repeated group. For n items where one kind appears p times, another q times and another r times:
n! / (p! q! r!)
MISSISSIPPI has 11 letters: I appears 4 times, S 4 times, P 2 times and M once. The number of distinct arrangements is 11! / (4! 4! 2!) = 34650.
Circular arrangements
Around a round table, rotating everyone by one seat gives the same arrangement. Fix one person, then arrange the other n − 1 people: (n − 1)! ways. If clockwise and anticlockwise count as the same (a necklace or garland), halve it: (n − 1)! / 2.
Items that must stay together
Glue the items into one block and treat the block as a single item. Then multiply by the number of internal orders of the block.
For example, 7 books are placed on a shelf with 2 particular books side by side. The block plus the other 5 books make 6 units, which gives 6! arrangements. The 2 books can swap inside the block, so multiply by 2!. The answer is 6! × 2! = 1440.
Combinations: order does not matter
A combination is a selection, a group where the order of picking is irrelevant.
C(n, r) = n! / (r! (n − r)!)
C(n, r) equals P(n, r) divided by r!. The division removes the r! orderings of each group that the permutation count treated as different. Two identities save time:
- C(n, r) = C(n, n − r). Choosing who joins is the same as choosing who is left out. So C(10, 8) = C(10, 2) = 45.
- C(n, 0) = C(n, n) = 1.
Some everyday uses:
- Handshakes among 10 people, one per pair: C(10, 2) = 45.
- Diagonals of an n-sided polygon: C(n, 2) − n. For an octagon this is 28 − 8 = 20.
- 5-card hands from a 52-card deck: C(52, 5) = 2,598,960.
Deciding between permutation and combination
Ask one question: if I swap two chosen items, do I get a different outcome?
- If yes, as with a president and a secretary, a PIN or a finishing order, order matters. Use permutations.
- If no, as with a committee, a hand of cards or a set of balls drawn together, order does not matter. Use combinations.
Worked examples
Example 1: a committee with a condition
A committee of 4 is chosen from 5 men and 4 women. How many committees have at least 2 women?
Direct method. Add the cases and multiply within each case:
- 2 women and 2 men: C(4, 2) × C(5, 2) = 6 × 10 = 60
- 3 women and 1 man: C(4, 3) × C(5, 1) = 4 × 5 = 20
- 4 women: C(4, 4) = 1
The total is 60 + 20 + 1 = 81.
Complement method. Count all committees, then subtract the ones with fewer than 2 women:
- All committees: C(9, 4) = 126
- No women: C(5, 4) = 5
- Exactly 1 woman: C(4, 1) × C(5, 3) = 4 × 10 = 40
The result is 126 − 5 − 40 = 81. Both methods agree. When a condition says "at least", the complement is often shorter. The same idea returns in the chapter on the complement rule.
Example 2: a restricted digit count
How many 4-digit even numbers can be formed from the digits 0 to 9 with no digit repeated?
The first digit cannot be 0 and the last digit must be even. The two restrictions compete for the digit 0, so split by the last digit.
- Last digit 0: the first three places use the remaining 9 digits in order, so 9 × 8 × 7 = 504.
- Last digit 2, 4, 6 or 8 (4 choices): fill the first digit next, which has 8 choices (not 0, not the last digit). Then 8 choices remain for the second digit and 7 for the third, so 8 × 8 × 7 = 448 for each last digit. That gives 4 × 448 = 1792.
The total is 504 + 1792 = 2296.
The rule to remember is to fill the most restricted position first. Where restrictions overlap, split into cases.
Example 3: distributing identical items
In how many ways can 10 identical sweets be given to 3 children, if a child may get none?
Line up 10 sweets and 2 dividers. Choosing which 2 of the 12 slots hold the dividers fixes the distribution. The count is C(12, 2) = 66.
In general, n identical items shared among k people (zero allowed) give C(n + k − 1, k − 1). If each person must get at least one item, first give everyone one item and distribute the rest: C(n − 1, k − 1).
Checking your counts in code
For a small case, brute-force enumeration confirms a formula. The program below checks Examples 1 and 2, the MISSISSIPPI count and the relation between P and C.
from itertools import combinations, permutations
from math import comb, perm, factorial
# Example 1: committees of 4 from 5 men and 4 women with at least 2 women
people = [("M", i) for i in range(5)] + [("W", i) for i in range(4)]
brute = sum(
1 for group in combinations(people, 4)
if sum(1 for p in group if p[0] == "W") >= 2
)
formula = comb(9, 4) - comb(5, 4) - comb(4, 1) * comb(5, 3)
print(brute, formula) # 81 81
# Example 2: 4-digit even numbers, no repeated digit
even_count = sum(
1 for d in permutations(range(10), 4)
if d[0] != 0 and d[3] % 2 == 0
)
print(even_count) # 2296
# Repeated letters
print(factorial(11) // (factorial(4) * factorial(4) * factorial(2))) # 34650
# P(n, r) = C(n, r) * r!
print(perm(5, 3), comb(5, 3) * factorial(3)) # 60 60Common errors
| Error | Why it is wrong | Fix |
|---|---|---|
| Using P(n, r) for a committee | It counts each group r! times | Use C(n, r) when order is irrelevant |
| Using C(n, r) for a ranking | It treats different orders as one outcome | Use P(n, r), or multiply C(n, r) by r! |
| Forgetting to divide for identical items | Swapping identical letters is not a new arrangement | Divide by the factorial of each repeat count |
| Adding when you should multiply | Independent steps combine as AND | Multiply across steps, add across cases |
| Multiplying when cases overlap | Overlapping cases double count | Split into disjoint cases or use the complement |
| Ignoring a zero restriction | Leading zeros are not valid in numbers | Fill the restricted place first |
| Using n! for a round table | Rotations are counted as different | Use (n − 1)! |
How this feeds into probability
The next chapters define probability as favourable outcomes over total equally likely outcomes. For that to work, both counts must treat outcomes the same way. If the denominator counts hands as unordered, the numerator must as well. For example, the chance of drawing 2 red balls from a bag of 5 red and 3 blue is C(5, 2) / C(8, 2) = 10/28 = 5/14. You could instead count ordered draws, P(5, 2) / P(8, 2) = 20/56, and get the same answer. Mixing the two styles gives a wrong answer, so decide on one style per problem and keep to it.
Exercises
Exercise
Seven different books are arranged on a shelf. Two particular books must be side by side. How many arrangements are there?
Show answer
Treat the two books as one block. The block and the other 5 books make 6 units, which can be arranged in 6! = 720 ways. The two books can swap places inside the block in 2! = 2 ways. The total is 720 × 2 = 1440.
Exercise
A team of 3 is chosen from 6 boys and 4 girls. How many teams contain at least one girl?
Show answer
Use the complement. All teams: C(10, 3) = 120. Teams with no girls: C(6, 3) = 20. Teams with at least one girl: 120 − 20 = 100.
Exercise
Eight people sit around a round table. Two particular people must sit next to each other. How many seating arrangements are there?
Show answer
Glue the two people into a block. The block and the other 6 people make 7 units around a circle, which can be arranged in (7 − 1)! = 720 ways. The two people can swap inside the block in 2 ways. The total is 720 × 2 = 1440.
Exercise
How many distinct arrangements are there of the letters of the word LEADER?
Show answer
LEADER has 6 letters, and E appears twice. The count is 6! / 2! = 720 / 2 = 360.