IB Mathematics AA – Topic 1: Number & Algebra

Comprehensive Guide to Counting Principles

Introduction to Counting Principles

Counting principles provide systematic methods for determining the number of ways events can occur or items can be arranged or selected. While simple counting is straightforward, counting arrangements and selections in complex scenarios requires careful strategy to avoid missing possibilities or counting duplicates.

These principles form the foundation of combinatorics—the branch of mathematics dealing with counting, arrangement, and selection. They are essential for probability theory, statistics, algorithm analysis, and many real-world applications from scheduling to cryptography.

Key Question: How many different passwords can be created? How many ways can students be seated? How many teams can be formed? Counting principles give us the tools to answer these questions systematically.

In this guide: We'll explore factorial notation, the product and sum principles, and the crucial distinction between permutations (when order matters) and combinations (when order doesn't matter).

1. Factorial Notation

Definition & Concept

The factorial of a non-negative integer \(n\), denoted \(n!\) (read "n factorial"), is the product of all positive integers from 1 to \(n\). Factorials are fundamental in counting problems because they represent the number of ways to arrange \(n\) distinct objects.

Intuition: If you have 5 books to arrange on a shelf, there are 5 choices for the first position, 4 remaining choices for the second, 3 for the third, 2 for the fourth, and 1 for the last. Total: \(5 \times 4 \times 3 \times 2 \times 1 = 5! = 120\) arrangements.

Factorial Definition:

\(n! = n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1\)

for any positive integer \(n\)

Special Case: \(0! = 1\) (by definition)

Computing Factorials

First Several Factorials:

  • \(0! = 1\) (by definition)
  • \(1! = 1\)
  • \(2! = 2 \times 1 = 2\)
  • \(3! = 3 \times 2 \times 1 = 6\)
  • \(4! = 4 \times 3 \times 2 \times 1 = 24\)
  • \(5! = 5 \times 4 \times 3 \times 2 \times 1 = 120\)
  • \(6! = 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 720\)
  • \(7! = 7 \times 6! = 7 \times 720 = 5,040\)
  • \(8! = 8 \times 7! = 8 \times 5,040 = 40,320\)
  • \(10! = 3,628,800\)

Important Properties

Key Properties of Factorials:

  • 1. Recursive Property: \(n! = n \times (n-1)!\)

    Each factorial can be expressed in terms of the previous one

  • 2. Cancellation in Fractions: \(\displaystyle\frac{n!}{(n-r)!} = n(n-1)(n-2)\cdots(n-r+1)\)

    The terms from \((n-r)!\) cancel, leaving \(r\) factors

    Example: \(\frac{7!}{4!} = 7 \times 6 \times 5 = 210\)

  • 3. Rapid Growth: Factorials grow extremely fast

    \(10! = 3.6\) million, \(20! \approx 2.4 \times 10^{18}\)

  • 4. Zero Factorial: \(0! = 1\) (NOT zero!)

    This definition makes many formulas work correctly

⚠ Common Pitfalls:

  • \(0! = 1\), not 0. This is often tested and frequently confused!
  • Factorial is only defined for non-negative integers (no negative factorials or factorials of decimals).
  • Don't compute unnecessarily large factorials—always cancel first in fractions!
  • \(n! \neq n^n\) — these are completely different: \(4! = 24\) but \(4^4 = 256\)
  • When simplifying, look for factorial cancellation before multiplying out.

💡 Calculation Tips:

  • Use your calculator's factorial function (usually \(n!\) or \(x!\) button)
  • For large values, calculators may show scientific notation or give errors
  • Always simplify fractions with factorials by canceling before computing
  • Remember: \(\frac{n!}{k!} = n(n-1)\cdots(k+1)\) when \(n > k\)

Example 1: Simplifying Factorial Expressions

Problem: Simplify the following expressions:

(a) \(\displaystyle\frac{8!}{5!}\)

(b) \(\displaystyle\frac{n!}{(n-2)!}\)

(c) \(\displaystyle\frac{10!}{3! \times 7!}\)

Solution:

(a) \(\displaystyle\frac{8!}{5!}\)

Method 1: Expand and cancel

\(= \displaystyle\frac{8 \times 7 \times 6 \times 5!}{5!}\)

\(= 8 \times 7 \times 6\)

\(= 336\)

Method 2: Use the property \(\frac{n!}{(n-r)!} = n(n-1)\cdots(n-r+1)\)

Here \(n=8\), \(n-r=5\), so \(r=3\): product of 3 factors from 8 down

\(= 8 \times 7 \times 6 = 336\)

(b) \(\displaystyle\frac{n!}{(n-2)!}\)

Expand \(n!\) until you reach \((n-2)!\):

\(= \displaystyle\frac{n(n-1)(n-2)!}{(n-2)!}\)

\(= n(n-1)\)

(c) \(\displaystyle\frac{10!}{3! \times 7!}\)

Expand \(10!\) until you reach \(7!\):

\(= \displaystyle\frac{10 \times 9 \times 8 \times 7!}{3! \times 7!}\)

\(= \displaystyle\frac{10 \times 9 \times 8}{3!}\)

\(= \displaystyle\frac{10 \times 9 \times 8}{6}\)

\(= \displaystyle\frac{720}{6}\)

\(= 120\)

2. The Product Principle (AND Rule)

Definition & Theory

The Product Principle (also called the Multiplication Rule or Fundamental Counting Principle) states that if one event can occur in \(m\) ways and a second independent event can occur in \(n\) ways, then both events occurring in sequence can happen in \(m \times n\) ways.

Key Word: "AND" — When you need to do one task AND another task, multiply the number of ways.

Product Principle Formula:

If Event A can occur in \(m\) ways

AND Event B can occur in \(n\) ways

Then both can occur in \(m \times n\) ways

This extends to any number of events: \(n_1 \times n_2 \times n_3 \times \cdots\)

When to Use the Product Principle

Use Multiplication When:

  • You have a sequence of decisions or events
  • Each decision is independent of the others
  • The question asks for outcomes involving "AND"
  • You're choosing one item from each of several categories

Examples: Choosing an outfit (shirt AND pants AND shoes), creating passwords (digit AND letter AND symbol), menu selections (appetizer AND main AND dessert)

⚠ Common Mistakes:

  • Don't add when you should multiply! "A shirt AND pants" uses multiplication, not addition.
  • When items can't be repeated, adjust the count for each subsequent choice (10, then 9, then 8, ...).
  • Make sure events are truly independent—the outcome of one shouldn't restrict another.
  • Read carefully: "with replacement" means repetition allowed; "without replacement" means no repetition.

💡 Problem-Solving Strategy:

  1. Identify each decision or stage in the process
  2. Count the number of options at each stage
  3. Check if repetition is allowed (affects later stages)
  4. Multiply the number of options at each stage
  5. Verify your answer makes sense (order of magnitude check)

Example 2: Product Principle (Basic Application)

Problem: A restaurant offers:

  • 5 different appetizers
  • 8 different main courses
  • 4 different desserts

How many different three-course meals (appetizer, main course, and dessert) can be ordered?

Solution:

This is a sequence of three independent choices.

Stage 1: Choose an appetizer — 5 options

Stage 2: Choose a main course — 8 options

Stage 3: Choose a dessert — 4 options

Apply the Product Principle:

Total number of meals = \(5 \times 8 \times 4\)

\(= 40 \times 4\)

\(= 160\) different meals

Answer: 160 different three-course meals can be ordered.

Example 3: Product Principle with Restrictions (IB-Style)

Problem: How many 4-digit PIN codes can be formed using the digits 0-9 if:

(a) digits can be repeated?

(b) digits cannot be repeated?

(c) digits can be repeated but the PIN must not start with 0?

Solution:

(a) With repetition allowed:

Position 1: 10 choices (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

Position 2: 10 choices (any digit can be repeated)

Position 3: 10 choices

Position 4: 10 choices

Total: \(10 \times 10 \times 10 \times 10 = 10^4 = \) 10,000 PINs

(b) Without repetition:

Position 1: 10 choices

Position 2: 9 choices (can't use the first digit again)

Position 3: 8 choices (can't use first two)

Position 4: 7 choices (can't use first three)

Total: \(10 \times 9 \times 8 \times 7 = \) 5,040 PINs

(c) With repetition but not starting with 0:

Position 1: 9 choices (1, 2, 3, 4, 5, 6, 7, 8, 9 — cannot be 0)

Position 2: 10 choices (any digit, including 0)

Position 3: 10 choices

Position 4: 10 choices

Total: \(9 \times 10 \times 10 \times 10 = 9 \times 10^3 = \) 9,000 PINs

Note: Restrictions typically reduce the number of options for specific positions.

3. The Sum Principle (OR Rule)

Definition & Theory

The Sum Principle (also called the Addition Rule) states that if one event can occur in \(m\) ways and a different, mutually exclusive event can occur in \(n\) ways, then one event OR the other can occur in \(m + n\) ways.

Key Word: "OR" — When you're choosing between alternatives (this OR that, not both), add the number of ways.

Critical Requirement: The events must be mutually exclusive (cannot happen simultaneously) for simple addition to work.

Sum Principle Formula:

If Event A can occur in \(m\) ways

OR Event B can occur in \(n\) ways

(and A and B are mutually exclusive)

Then one or the other can occur in \(m + n\) ways

For multiple options: \(n_1 + n_2 + n_3 + \cdots\)

When to Use the Sum Principle

Use Addition When:

  • You're choosing between alternatives (one option or another)
  • The options are mutually exclusive (can't do both)
  • The question asks for outcomes involving "OR"
  • You're counting different categories separately

Examples: Travel by bus OR train, wear a dress OR pants, choose route A OR route B

⚠ Critical Warning - Mutual Exclusivity:

  • Only use addition if the events CANNOT happen at the same time!
  • If events can overlap, you need the Inclusion-Exclusion Principle: \(|A \cup B| = |A| + |B| - |A \cap B|\)
  • Example: "Students taking French OR Spanish" requires inclusion-exclusion if some take both languages.
  • When in doubt, check: Can both happen simultaneously? If yes, don't simply add!

💡 AND vs OR Quick Guide:

  • "AND" = Multiply: Doing multiple things in sequence
  • "OR" = Add: Choosing between mutually exclusive alternatives
  • Test: Can you do both at once? If yes, use "AND" (multiply)
  • Remember: Many problems combine both principles!

Example 4: Sum Principle (Basic Application)

Problem: A student can travel to school by:

  • Taking one of 3 different bus routes
  • Taking one of 2 different train lines
  • Cycling (1 way)

In how many different ways can the student travel to school?

Solution:

The student chooses ONE method of travel (mutually exclusive options).

Option 1: Bus — 3 ways

Option 2: Train — 2 ways

Option 3: Cycle — 1 way

Since these are mutually exclusive (can only use one method), use the Sum Principle:

Total ways = \(3 + 2 + 1 = \) 6 ways

Answer: The student can travel to school in 6 different ways.

Example 5: Combining Product and Sum Principles (IB-Style)

Problem: At a café, customers can order:

  • Coffee: Choose size (small, medium, large) AND type (espresso, latte, cappuccino)
  • Tea: Choose from 5 different tea varieties

How many different beverage options are available?

Solution:

Step 1: Count coffee options (using Product Principle).

For coffee: choose size AND choose type

Sizes: 3 options

Types: 3 options

Coffee combinations: \(3 \times 3 = 9\) options

Step 2: Count tea options.

Tea varieties: 5 options

Step 3: Combine using Sum Principle.

Customer orders coffee OR tea (mutually exclusive)

Total beverages: \(9 + 5 = \) 14 options

Answer: There are 14 different beverage options available.

Key insight: We multiplied within coffee (size AND type), then added between drinks (coffee OR tea).

4. Permutations (Order Matters)

Definition & Concept

A permutation is an arrangement of objects where order matters. The word "permutation" comes from the Latin "permutare" meaning "to change thoroughly." When we arrange objects in a specific sequence, different orders count as different permutations.

Key Question: Does ABC differ from BAC? If YES, you're counting permutations!

Examples where order matters: Race finishing positions, lock combinations, seating arrangements, passwords, phone numbers

Permutation Formulas:

Permutations of n distinct objects:

\(P(n) = n!\)

The number of ways to arrange \(n\) distinct objects

Permutations of r objects from n:

\(P(n,r) = \,^nP_r = \displaystyle\frac{n!}{(n-r)!}\)

The number of ways to arrange \(r\) objects selected from \(n\) distinct objects

Alternative formula: \(P(n,r) = n(n-1)(n-2)\cdots(n-r+1)\) (product of \(r\) consecutive integers from \(n\) down)

Understanding the Formula

Why \(P(n,r) = \frac{n!}{(n-r)!}\)?

When arranging \(r\) objects from \(n\):

  • First position: \(n\) choices
  • Second position: \(n-1\) choices (one already used)
  • Third position: \(n-2\) choices
  • ...
  • \(r\)th position: \(n-r+1\) choices

Total: \(n(n-1)(n-2)\cdots(n-r+1) = \displaystyle\frac{n!}{(n-r)!}\)

⚠ Common Mistakes:

  • Don't confuse permutations with combinations! If order matters, use permutations.
  • \(P(n,r) \neq n^r\) — These are different! \(P(5,2) = 20\) but \(5^2 = 25\)
  • Remember: \(P(n,n) = n!\) (arranging all \(n\) objects)
  • Calculator: Use nPr function, not manual calculation for large values
  • Check if repetition is allowed—standard permutations assume no repetition

💡 When to Use Permutations:

  • Question asks for "arrangements" or "orderings"
  • Different sequences count as different outcomes
  • Keywords: "rank," "order," "arrange," "sequence," "line up"
  • Examples: Seating people in a row, race finishing order, arranging books

Example 6: Basic Permutations

Problem: Calculate:

(a) The number of ways to arrange 5 books on a shelf

(b) \(P(8, 3)\)

(c) The number of ways to arrange 3 people from a group of 10

Solution:

(a) Arranging 5 books (all 5 objects):

Use \(P(n) = n!\) where \(n = 5\)

\(P(5) = 5! = 5 \times 4 \times 3 \times 2 \times 1\)

\(= 120\) arrangements

(b) \(P(8, 3) = \displaystyle\frac{8!}{(8-3)!} = \frac{8!}{5!}\)

Method 1: Cancel factorials

\(= \displaystyle\frac{8 \times 7 \times 6 \times 5!}{5!} = 8 \times 7 \times 6\)

\(= 336\)

Method 2: Direct product

\(P(8,3) = 8 \times 7 \times 6 = 336\)

(c) Arranging 3 people from 10:

Use \(P(n,r) = P(10,3)\)

\(= 10 \times 9 \times 8\)

\(= 720\) arrangements

Interpretation: There are 720 different ways to arrange 3 people selected from 10 (e.g., for 1st, 2nd, 3rd place).

Example 7: Permutations with Restrictions (IB-Style)

Problem: Seven students are to be seated in a row for a photograph.

(a) How many different arrangements are possible?

(b) How many arrangements are possible if two particular students must sit next to each other?

(c) How many arrangements are possible if two particular students must NOT sit next to each other?

Solution:

(a) No restrictions:

Arrange 7 students: \(7! = 5,040\) arrangements

(b) Two specific students must sit together:

Strategy: Treat the two students as a single unit.

Now we have 6 units to arrange: (AB), C, D, E, F, G

Ways to arrange 6 units: \(6! = 720\)

But A and B can be arranged within their unit in 2 ways: AB or BA

Total: \(6! \times 2 = 720 \times 2 = \) 1,440 arrangements

(c) Two specific students must NOT sit together:

Strategy: Total arrangements minus arrangements where they're together

Total arrangements = \(7! = 5,040\)

Arrangements where together = 1,440 (from part b)

Arrangements where NOT together: \(5,040 - 1,440 = \) 3,600 arrangements

Key technique: "At least one" or "must not" problems often use complementary counting (total minus restricted case).

5. Combinations (Order Doesn't Matter)

Definition & Concept

A combination is a selection of objects where order doesn't matter. When we choose a group or subset, different orders of the same items count as the same combination.

Key Question: Are ABC and BAC the same selection? If YES, you're counting combinations!

Examples where order doesn't matter: Selecting committee members, choosing pizza toppings, lottery numbers, forming teams, selecting cards from a deck

Combination Formula:

Combinations of r objects from n:

\(C(n,r) = \,^nC_r = \displaystyle\binom{n}{r} = \frac{n!}{r!(n-r)!}\)

The number of ways to choose \(r\) objects from \(n\) distinct objects

(where order doesn't matter)

Relationship Between Permutations and Combinations

Key Relationship:

\(P(n,r) = C(n,r) \times r!\)

Or equivalently: \(C(n,r) = \displaystyle\frac{P(n,r)}{r!}\)

Intuition: Permutations count all arrangements. Combinations don't care about order, so we divide by \(r!\) (the number of ways to arrange \(r\) objects) to remove the ordering.

Example: ABC, ACB, BAC, BCA, CAB, CBA are 6 permutations but 1 combination.

Permutations vs Combinations

Aspect Permutations Combinations
Order Matters Doesn't matter
Formula \(\frac{n!}{(n-r)!}\) \(\frac{n!}{r!(n-r)!}\)
Keywords Arrange, order, rank, sequence Choose, select, committee, group
Example Race positions (1st, 2nd, 3rd) Forming a 3-person team
Result Larger number Smaller number

⚠ Common Mistakes:

  • Most common error: Using permutations when you need combinations (or vice versa)!
  • Remember: \(C(n,r) = C(n,n-r)\) (symmetry property—same as binomial coefficients)
  • Don't forget: \(C(n,0) = 1\) and \(C(n,n) = 1\)
  • Calculator: Use nCr function (same as binomial coefficient button)
  • Always \(C(n,r) < P(n,r)\) (combinations < permutations) because we're "dividing out" the order

💡 Decision Tree for Permutations vs Combinations:

  1. Ask: Does the order of selection matter?
  2. If YES (ABC ≠ BAC): Use Permutations \(P(n,r)\)
  3. If NO (ABC = BAC): Use Combinations \(C(n,r)\)
  4. Still unsure? Check keywords: "arrange/order" → permutations; "choose/select" → combinations

Example 8: Basic Combinations

Problem: Calculate:

(a) \(C(8, 3)\)

(b) The number of ways to choose 5 students from a class of 12

(c) The number of ways to select 2 books from a shelf of 7 books

Solution:

(a) \(C(8, 3) = \displaystyle\frac{8!}{3!(8-3)!} = \frac{8!}{3! \times 5!}\)

Cancel the \(5!\):

\(= \displaystyle\frac{8 \times 7 \times 6 \times 5!}{3! \times 5!} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1}\)

\(= \displaystyle\frac{336}{6}\)

\(= 56\)

(b) Choosing 5 students from 12:

Order doesn't matter (a committee is a committee regardless of selection order)

\(C(12, 5) = \displaystyle\frac{12!}{5! \times 7!}\)

\(= \displaystyle\frac{12 \times 11 \times 10 \times 9 \times 8}{5 \times 4 \times 3 \times 2 \times 1}\)

\(= \displaystyle\frac{95,040}{120}\)

\(= 792\) ways

(c) Selecting 2 books from 7:

\(C(7, 2) = \displaystyle\frac{7!}{2! \times 5!} = \frac{7 \times 6}{2 \times 1}\)

\(= 21\) ways

Quick check using symmetry: \(C(7,2) = C(7,5) = 21\) ✓

Example 9: Permutations vs Combinations (IB-Style)

Problem: A committee of 5 people is to be selected from 8 candidates.

(a) How many different committees can be formed?

(b) If a chairperson and secretary must be chosen from the 5 committee members, how many different ways can the full committee structure be formed?

Solution:

(a) Forming the committee (selection only):

Order doesn't matter—we just need to choose 5 from 8.

Use combinations: \(C(8, 5)\)

Using symmetry: \(C(8, 5) = C(8, 3) = \displaystyle\frac{8 \times 7 \times 6}{3 \times 2 \times 1} = \frac{336}{6} = 56\)

56 different committees

(b) Committee with specific roles:

This is a multi-stage problem:

Stage 1: Select 5 members from 8 (order doesn't matter)

Ways: \(C(8, 5) = 56\)

Stage 2: Choose chairperson from the 5 members

Ways: 5 choices

Stage 3: Choose secretary from remaining 4 members

Ways: 4 choices

Apply Product Principle (must do all three stages):

Total ways: \(56 \times 5 \times 4 = 56 \times 20 = \) 1,120 ways

Alternative Method: Choose and arrange 2 people for roles, then choose remaining 3: \(P(8,2) \times C(6,3) = 56 \times 20 = 1,120\)

Example 10: Complex Counting Problem (IB-Style)

Problem: A pizza shop offers 12 different toppings.

(a) How many different 4-topping pizzas can be ordered?

(b) How many different pizzas can be ordered with at most 3 toppings?

Solution:

(a) 4-topping pizzas:

Order of toppings doesn't matter (mushroom+olive = olive+mushroom)

Choose 4 toppings from 12: \(C(12, 4)\)

\(= \displaystyle\frac{12!}{4! \times 8!} = \frac{12 \times 11 \times 10 \times 9}{4 \times 3 \times 2 \times 1}\)

\(= \displaystyle\frac{11,880}{24}\)

\(= 495\) different pizzas

(b) At most 3 toppings (0, 1, 2, or 3 toppings):

Use Sum Principle for mutually exclusive cases:

0 toppings: \(C(12, 0) = 1\) way (plain pizza)

1 topping: \(C(12, 1) = 12\) ways

2 toppings: \(C(12, 2) = \frac{12 \times 11}{2} = 66\) ways

3 toppings: \(C(12, 3) = \frac{12 \times 11 \times 10}{6} = 220\) ways

Add all cases:

Total: \(1 + 12 + 66 + 220 = \) 299 different pizzas

Note: "At most \(k\)" means 0, 1, 2, ..., up to \(k\). "At least \(k\)" means \(k, k+1, k+2, ...\) up to maximum.

📋 Complete Formula Reference

Factorial:

\(n! = n \times (n-1) \times \cdots \times 2 \times 1\)

\(0! = 1\)

Cancellation:

\(\displaystyle\frac{n!}{(n-r)!} = n(n-1)\cdots(n-r+1)\)

Counting Principles:

Product (AND): \(m \times n\)

Sum (OR): \(m + n\)

(for mutually exclusive events)

Permutations (Order Matters):

\(P(n,r) = \displaystyle\frac{n!}{(n-r)!}\)

\(P(n,n) = n!\)

Combinations (Order Doesn't Matter):

\(C(n,r) = \displaystyle\frac{n!}{r!(n-r)!}\)

\(C(n,r) = C(n,n-r)\)

🔍 Decision Flowchart

Which Formula Should I Use?

Question 1: Are you selecting items OR arranging them?

→ If just counting stages/choices: Use Product or Sum Principle

→ If selecting/arranging from a set: Continue to Question 2

Question 2: Does order matter?

→ If YES (different orders are different outcomes): Use PERMUTATIONS \(P(n,r)\)

→ If NO (different orders are the same outcome): Use COMBINATIONS \(C(n,r)\)

Question 3: Are there multiple stages?

→ If AND (all stages required): MULTIPLY the counts

→ If OR (choose between options): ADD the counts

🎯 IB Exam Strategy

Reading the Question:

  • Identify keywords: "arrange" (permutation), "choose" (combination)
  • Look for restrictions: "must be," "cannot be," "at least," "at most"
  • Check if repetition is allowed or not
  • Determine if order matters in the context

Common Question Types:

  • Simple counting: Use product/sum principles directly
  • Arrangements: Use permutations or factorial
  • Selections: Use combinations
  • Restrictions: Use complementary counting or case-by-case analysis
  • Mixed problems: Break into stages, combine principles

Calculator Use:

  • Know where nPr and nCr functions are on your calculator
  • For large values, always use calculator rather than manual computation
  • Double-check you've entered \(n\) and \(r\) in the correct order
  • Verify answer makes sense (permutations > combinations for same \(n\), \(r\))

🎉 Master Counting Principles!

Counting principles are the foundation of probability, statistics, and discrete mathematics. With factorial notation, product and sum principles, permutations, and combinations, you now have a complete toolkit for systematic counting!

Key Success Factors:

  • ✓ Understand WHEN to use each principle or formula
  • ✓ Always ask: Does order matter? (Permutation vs Combination)
  • ✓ Check for restrictions and handle them systematically
  • ✓ Use complementary counting for "at least" or "at most" problems
  • ✓ Practice recognizing AND (multiply) vs OR (add) situations

Think Systematically • Show All Steps • Verify Your Answers

Success in counting = Success in IB Mathematics! 🚀