Sub topic 1
Counting Basics: Addition and Multiplication Principles
Prerequisites
This chapter assumes you can do the following:
- Basic arithmetic and simplifying fractions.
- Read a word problem and list its conditions.
- Use set ideas such as union and intersection at a basic level.
No factorials or nPr and nCr formulas are needed yet. Every later chapter in this tutorial uses the two principles taught here.
Why Start Here
Almost every permutation and combination formula is a shortcut for a long multiplication or a long sum. If you know where the shortcut comes from, you can rebuild it when an exam question does not match the standard pattern. CAT questions are often built to break a memorized formula. The two principles below do not break.
- The addition principle counts outcomes when you choose one option out of several separate cases.
- The multiplication principle counts outcomes when you make several choices one after another.
The main skill is deciding which one applies. The arithmetic is easy.
The Addition Principle
If a task can be done in one of several ways, and no outcome can come from two of those ways, the total is the sum of the counts for each way.
Say you can travel from city A to city B by 3 trains, 2 buses or 4 flights. You pick one mode and one service. The total is:
3 + 2 + 4 = 9 ways
The cases must be mutually exclusive. This means no single outcome belongs to two cases. A single trip cannot be both a train and a bus, so the cases are exclusive and you can add.
The word that signals addition is or: train or bus or flight.
When cases overlap
If the cases overlap, adding counts the shared outcomes twice. Suppose a class has 12 students who play cricket and 9 who play football, and 4 play both. The number who play at least one sport is:
12 + 9 − 4 = 17
Subtracting the overlap is the simplest case of inclusion-exclusion, which a later chapter covers in full. For now, the rule is to add only when the cases cannot share an outcome. If they can, split them into non-overlapping cases first, or subtract the overlap.
The Multiplication Principle
If a task is done in stages, and stage 1 can be done in m ways, and for each of those, stage 2 can be done in n ways, then the whole task can be done in m × n ways. This extends to any number of stages.
Say a meal is one starter (4 choices), one main (5 choices) and one dessert (3 choices). Each starter pairs with each main, and each of those pairs with each dessert:
4 × 5 × 3 = 60 meals
The word that signals multiplication is and: a starter and a main and a dessert.
The tree has 2 × 3 = 6 leaves. Each leaf is one complete outcome.
The dependent-stage version
The number of choices at a later stage may depend on an earlier choice, but the multiplication principle still works if the count is the same for every earlier choice. This is where most errors happen.
Say you form a 3-letter code from the letters A, B, C, D, E with no letter repeated.
- Position 1 has 5 choices.
- Position 2 has 4 choices, because one letter is used.
- Position 3 has 3 choices.
The total is 5 × 4 × 3 = 60. The letters available at position 2 differ depending on position 1, but the number of them is always 4. That is enough.
If the count at a later stage changes depending on an earlier choice, you cannot multiply straight through. You must split into cases first, then add. The next section shows this.
Combining the Two Principles
Real problems use both. A reliable method is:
- Decide whether the task splits into separate cases. If so, handle each case and add.
- Inside each case, decide whether the task is a sequence of choices. If so, multiply.
- Check that the cases cover everything and do not overlap.
Worked example: a count that needs cases
How many 2-digit numbers have an even tens digit or an even units digit... is a harder question than we need. Start with a cleaner one.
Problem. How many 3-digit numbers, with digits from 0 to 9 and no digit repeated, are even?
The units digit must be even, and the hundreds digit cannot be 0. The two restrictions collide at the digit 0, so the count at later stages depends on earlier choices. Split on the units digit.
Case 1: units digit is 0.
- Units: 1 way (0).
- Hundreds: 9 ways (any of 1 to 9).
- Tens: 8 ways (the remaining digits).
Count: 1 × 9 × 8 = 72.
Case 2: units digit is 2, 4, 6 or 8.
- Units: 4 ways.
- Hundreds: 8 ways (not 0, and not the units digit).
- Tens: 8 ways (not the hundreds digit, not the units digit, but 0 is allowed).
Count: 4 × 8 × 8 = 256.
The cases are exclusive because the units digit differs. Total: 72 + 256 = 328.
A useful habit is to fill the most restricted position first. Had we started with the hundreds digit, the units count would depend on whether the hundreds digit was even, and we would have needed more cases.
Check with a complement
There are 9 × 9 × 8 = 648 three-digit numbers with no repeated digit (hundreds 9 ways, tens 9 ways, units 8 ways). If 328 are even, 320 should be odd. Count the odd ones: units has 5 choices (1, 3, 5, 7, 9), hundreds has 8 (not 0, not the units digit), and tens has 8. That gives 5 × 8 × 8 = 320. The numbers add up: 328 + 320 = 648.
Counting with Repetition Allowed
When a choice can be repeated, the count at each stage does not shrink.
How many 4-digit PIN codes use digits 0 to 9, with repetition allowed? Each of the 4 positions has 10 choices, so the total is 10⁴ = 10,000.
How many ways can 5 different letters be posted into 3 letterboxes, where any box can hold any number of letters? Each letter has 3 choices of box, so the total is 3⁵ = 243. Note the direction of the exponent. The choices are the base, and the number of items making choices is the exponent. Reversing it gives 5³ = 125, which counts something different: assigning 3 letters to 5 boxes.
Checking With Code
You can check small counts by listing every outcome. This is a good habit for building trust in a method, even though it is not possible in the exam.
from itertools import permutations
# Even 3-digit numbers with distinct digits
count = 0
for digits in permutations(range(10), 3):
hundreds, tens, units = digits
if hundreds != 0 and units % 2 == 0:
count += 1
print(count) # 328
# Case split gives the same answer
case1 = 1 * 9 * 8
case2 = 4 * 8 * 8
print(case1 + case2) # 328
# Repetition allowed: 5 letters into 3 boxes
print(3 ** 5) # 243Common Errors
| Error | What goes wrong | Fix |
|---|---|---|
| Adding when you should multiply | Treating "and" steps as alternatives | Ask whether you do all the steps or pick one path |
| Multiplying when you should add | Treating exclusive options as steps | Ask whether outcomes come from separate cases |
| Adding overlapping cases | Outcomes counted twice | Subtract the overlap or redefine the cases |
| Multiplying through a changing count | Later-stage count depends on an earlier choice | Split into cases on the troublesome choice |
| Reversing base and exponent | 3⁵ confused with 5³ | Choices form the base, items form the exponent |
| Filling the easy position first | Restricted position then needs many cases | Fill the most restricted position first |
Summary
- Use addition for separate, non-overlapping cases ("or").
- Use multiplication for sequential choices ("and").
- Multiply through only when the count at each stage does not depend on which earlier option was chosen. Otherwise split into cases.
- Fill the most restricted position first.
- Verify with a complement or a small enumeration.
Exercise
How many 3-digit numbers (digits 0 to 9, no digit repeated) are divisible by 5?
Show answer
A number is divisible by 5 if its units digit is 0 or 5. Case 1, units digit 0: hundreds has 9 ways, tens has 8 ways, so 1 × 9 × 8 = 72. Case 2, units digit 5: hundreds has 8 ways (not 0 and not 5), tens has 8 ways (not the hundreds digit and not 5, but 0 is allowed), so 1 × 8 × 8 = 64. Total: 72 + 64 = 136.
Exercise
A password has 2 letters from A to Z followed by 3 digits from 0 to 9. Repetition is allowed. How many passwords are possible, and how many have no repeated letter and no repeated digit?
Show answer
With repetition: 26 × 26 × 10 × 10 × 10 = 676,000. Without repeats: letters 26 × 25 = 650, digits 10 × 9 × 8 = 720, so 650 × 720 = 468,000.
Exercise
In a group, 20 people speak English, 15 speak Hindi and 6 speak both. Each person speaks at least one of the two. How many people are in the group? Then say why simply adding 20 and 15 is wrong.
Show answer
The group has 20 + 15 − 6 = 29 people. Adding 20 and 15 counts each of the 6 bilingual people twice, because they belong to both cases, so the cases are not mutually exclusive.