# Counting Principles

> IB Mathematics: Analysis and Approaches HL · Number & Algebra
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u1-counting-principles/

This sub-topic covers core combinatorial counting rules to calculate the number of possible outcomes for selections and arrangements. These rules form the foundation for binomial theorem and probability in later IB AA HL topics.

**Prerequisites:** [Factorials and basic set operations](https://www.owlsprep.com/study/ib-math-aa-hl-u1-sets-and-operations/)

## Learning objectives

- Apply the product rule and sum rule to solve basic counting problems
- Distinguish between permutations and combinations based on whether order matters
- Calculate permutations with repeated identical elements and restricted positions
- Solve context-based combinatorial problems common in IB exams

## Fundamental Counting Rules

All counting problems are built from two fundamental rules that apply to different logical scenarios: the product rule for independent sequential choices, and the sum rule for mutually exclusive options.

**Product Rule** — If there are $n$ ways to complete one independent task, and $m$ ways to complete a second independent task, there are $n \times m$ ways to complete both tasks in sequence.

*Notation:* n \times m

*Example:* Choosing 1 shirt from 5 options and 1 tie from 3 options gives $5 \times 3 = 15$ total outfit combinations.

The sum rule applies when you select exactly one option from mutually exclusive groups. If group A has $n$ options and group B has $m$ options, there are $n + m$ total possible selections.

**Worked example:** A café offers 6 appetizers, 12 main courses, and 4 desserts. How many total 3-course meals are possible? How many total single-item orders (appetizer OR main OR dessert)?

1. 3-course meals require choosing one of each item (independent sequential choices), so apply the product rule:
2. $$6 \times 12 \times 4 = 288$$
3. Single-item orders are mutually exclusive (you choose one item only), so apply the sum rule:
4. $$6 + 12 + 4 = 22$$
5. Final results: 288 3-course meals, 22 single-item orders.

*Calculator:* allowed

## Permutations of Distinct Elements

Permutations are used when we count ordered arrangements of distinct elements. Order matters here: switching two elements creates a new outcome (e.g. arranging people in a line, creating a password).

**Permutation** — The number of ordered selections of $k$ distinct elements from a set of $n$ total distinct elements. For arrangements of all $n$ elements, $P(n,n) = n!$.

*Notation:* P(n,k) = \frac{n!}{(n-k)!}

> **tip**
>
> If repetition of elements is allowed, use the product rule $n^k$ instead of the permutation formula for distinct elements.

**Worked example:** How many 3-digit passwords can be created from digits 1-9 with no repeated digits? How many ways can 4 people be arranged in a row for a photo?

1. For passwords, we need ordered selections of 3 distinct digits from 9, so calculate $P(9,3)$:
2. $$P(9,3) = \frac{9!}{(9-3)!} = 9 \times 8 \times 7 = 504$$
3. For arranging 4 people, we arrange all 4 distinct people, so calculate $P(4,4) = 4!$:
4. $$4! = 4 \times 3 \times 2 \times 1 = 24$$
5. Final results: 504 passwords, 24 arrangements.

> **Exam tip:** Always confirm if repetition is allowed before choosing the permutation formula.

*Calculator:* allowed

## Combinations (Unordered Selections)

Combinations are used when the order of selection does not matter. Switching two elements does not create a new outcome (e.g. choosing a committee of students, selecting marbles from a bag).

**Combination** — The number of unordered selections of $k$ distinct elements from a set of $n$ total distinct elements, where $0 \leq k \leq n$.

*Notation:* \binom{n}{k} = \frac{n!}{k!(n-k)!}

> **mnemonic**
>
> Order is everything for permutations; combinations don't care about order.

**Worked example:** How many ways can a 3-person committee be selected from a group of 8 students? How many ways to select 2 apples and 3 oranges from 5 apples and 7 oranges?

1. Committee membership is unordered, so calculate $\binom{8}{3}$:
2. $$\binom{8}{3} = \frac{8!}{3!5!} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = 56$$
3. For fruit selection, calculate combinations separately for apples and oranges, then multiply by the product rule:
4. $$\binom{5}{2} \times \binom{7}{3} = 10 \times 35 = 350$$
5. Final results: 56 committees, 350 fruit selections.

*Calculator:* allowed

## Permutations with Repeats & Restrictions

IB exam problems often include permutations with repeated identical elements or restricted positions (e.g. vowels must go at the start of a word). These require adjusted counting formulas.

For permutations of $n$ items with repeated identical groups of size $n_1, n_2, ..., n_k$, the number of distinct arrangements is given by $\frac{n!}{n_1! n_2! ... n_k!}$.

**Worked example:** How many distinct arrangements are there of the letters in the word "STATISTICS"?

1. Count total letters and repeated groups: 10 total letters, 3 S, 3 T, 2 I, 1 A, 1 C.
2. Substitute into the repeated permutation formula:
3. $$\frac{10!}{3! \cdot 3! \cdot 2! \cdot 1! \cdot 1!} = 50400$$

For problems with restricted positions, always count the restricted positions first, then count permutations for the remaining positions.

> **Exam tip:** For restricted arrangements, fix the restricted elements first to avoid overcounting.

*Calculator:* allowed

## Common pitfalls

- **Wrong:** Using permutations for unordered selections
  - Why it fails: Permutations count order, so they overcount unordered outcomes by a factor of $k!$
  - Correct: Confirm if order matters: use combinations for unordered selections
- **Wrong:** Using the permutation formula for selections with repetition
  - Why it fails: Permutations of distinct elements assume no repeats, leading to undercounting when repeats are allowed
  - Correct: Use the product rule $n^k$ for ordered selections where repetition is allowed
- **Wrong:** Adding instead of multiplying (or vice versa) for AND/OR scenarios
  - Why it fails: AND (both events) requires multiplication, OR (one event) requires addition
  - Correct: Identify the logical connective first: multiply for AND, add for OR
- **Wrong:** Not dividing by factorials for repeated identical items
  - Why it fails: Swapping identical items does not create a new arrangement, leading to overcounting
  - Correct: Divide by the factorial of the count of each identical group when counting arrangements

## Cheatsheet

| Rule | When to use | Formula |
| --- | --- | --- |
| Product Rule | Independent sequential choices (A AND B) | $n \times m$ |
| Sum Rule | Mutually exclusive options (A OR B) | $n + m$ |
| Permutation (no repeat) | Order matters, distinct elements | $\frac{n!}{(n-k)!}$ |
| Combination | Order does not matter, no repeat | $\frac{n!}{k!(n-k)!}$ |
| Permutation with repeats | Distinct arrangements of identical items | $\frac{n!}{n_1!n_2!...n_k!}$ |
| Ordered with repetition | Repeats allowed, order matters | $n^k$ |

## What's next

Counting principles are the foundational building block for almost all combinatorics and probability topics in IB AA HL. You will immediately use these rules to expand binomials in the binomial theorem, calculate probabilities of compound events, and find probabilities for discrete distributions like the binomial distribution. Advanced counting problems with restrictions also often appear as short questions in Paper 1 and longer problems in Paper 3, so mastering these rules will prevent simple errors that cost you marks in higher-weight questions.

- [Binomial Theorem](https://www.owlsprep.com/study/ib-math-aa-hl-u1-binomial-theorem/)
- [Proof techniques (HL only)](https://www.owlsprep.com/study/ib-math-aa-hl-u1-proof-techniques/)
- [Complex numbers fundamentals](https://www.owlsprep.com/study/ib-math-aa-hl-u1-complex-numbers-fundamentals/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u1-counting-principles/
