6. Clever counting

By now you have several different counting tools: lists, tables, trees, multiplication, factorials, combinations and Pascal’s triangle.

The final skill is learning when not to count a problem in the obvious way.

Count what is easier

Suppose a four-digit code can use any digit from 0 to 9, and repetition is allowed.

How many codes contain at least one 7?

Trying to count codes with exactly one 7, then exactly two 7s, and so on would work — but there is a much easier route.

There are

104 = 10,000

four-digit codes altogether.

If a code contains no 7 at all, each digit has only 9 choices:

94 = 6,561

So the number containing at least one 7 is

10,000 − 6,561 = 3,439

Main idea
Sometimes it is easier to count the opposite

If every possibility is either wanted or unwanted, then:

wanted = total − unwanted

Practice puzzle
At least one head

A coin is tossed 5 times.

How many sequences contain at least one head?
💡
Learning tipThere are 2 choices on each toss. What is the one sequence with no heads?
Reveal answer

There are 25 = 32 sequences altogether.

Only one contains no heads: TTTTT.

32 − 1 = 31

So there are 31 sequences with at least one head.

Split into cases

Another useful strategy is to split a problem into separate cases that cannot overlap.

Suppose a café offers 4 sandwiches and 3 salads. You may order either one sandwich or one salad.

There are 4 sandwich orders and 3 salad orders, so:

4 + 3 = 7

Important rule
Multiply through stages; add separate cases

When one choice is followed by another, multiply. When a problem divides into distinct alternatives, count each alternative and add.

Practice puzzle
A code beginning with a letter or a digit

A two-symbol code is made in one of two ways:

  • a letter followed by a digit;
  • or a digit followed by a letter.

There are 26 letters and 10 digits.

How many codes are possible?
💡
Learning tipCount the two cases separately. They cannot overlap.
Reveal answer

Letter then digit: 26 × 10 = 260.

Digit then letter: 10 × 26 = 260.

260 + 260 = 520

There are 520 codes.

Use symmetry

Sometimes several parts of a problem must have the same answer by symmetry.

Imagine choosing 3 people from 8. The number of groups containing Alice is the same as the number containing Ben, Charlie or any other particular person.

Recognising symmetry can save a lot of repeated work.

Practice puzzle
Who is chosen most often?

All 3-person teams are formed from 6 children.

Does any child appear in more teams than another?
💡
Learning tipThe children play identical roles in the problem. Is there any reason one could be special?
Reveal answer

No. By symmetry, every child must appear in the same number of teams.

In fact, fixing one child leaves 2 teammates to choose from the remaining 5, so each child appears in 10 teams.

Count the same thing in two ways

One of the most powerful counting tricks is to count the same collection in two different ways.

Suppose 8 people each shake hands with every other person exactly once.

From each person’s point of view there are 7 handshakes, so:

8 × 7 = 56

But this counts every handshake twice — once from each end.

56 ÷ 2 = 28

Practice puzzle
Diagonals in a polygon

A hexagon has 6 vertices. Join every pair of vertices by a straight line.

How many diagonals does the hexagon have?
💡
Learning tipFirst count all pairs of vertices. Then remove the 6 sides.
Reveal answer

There are C(6,2) = 15 pairs of vertices.

Six of those pairs are sides of the hexagon.

15 − 6 = 9

So there are 9 diagonals.

Look for a simpler object

Sometimes a complicated-looking problem becomes easy if we match each object we want to count with a simpler object.

For example, every subset of 7 objects corresponds to a seven-place yes/no pattern:

in, out, in, in, out, out, in

Each of the 7 positions has 2 choices, so there are 27 subsets.

Challenge
How many rectangles?

A grid has 4 vertical lines and 5 horizontal lines.

How many rectangles are formed by the grid lines?
💡
Learning tipEvery rectangle is completely determined by choosing two vertical lines and two horizontal lines.
Reveal answer

Choose 2 of the 4 vertical lines:

C(4,2) = 6

Choose 2 of the 5 horizontal lines:

C(5,2) = 10

Every pair of vertical choices can be combined with every pair of horizontal choices:

6 × 10 = 60

So the grid contains 60 rectangles.

Your counting toolbox

There is rarely just one way to solve a counting problem. Before calculating, ask what structure the problem has.

  • List systematically when the number of possibilities is small.
  • Multiply when choices happen in stages.
  • Use factorials for arrangements.
  • Use combinations when order does not matter.
  • Use Pascal’s triangle to see relationships between combination numbers.
  • Subtract from the total when the opposite is easier.
  • Split into cases when possibilities fall into separate types.
  • Use symmetry to avoid repeating equivalent work.
  • Count twice when two viewpoints reveal the same collection.
Final idea
Good counting is mostly about seeing structure

The arithmetic is often the easy part. The real skill is finding a way to organise the possibilities so that every object is counted exactly once — or understanding precisely why you have counted it more than once.

You have reached the end of the Counting & Combinatorics course.

Help us improve

What did you think?

Whether you explored this together or worked independently, we would love to hear from both parents and young learners. Tell us what you enjoyed, what was confusing, or what you would like to see next.

Share your feedback

The form is short and you do not need to give your name.

COUNTING & COMBINATORICS COURSE
Keep exploring
← Previous lesson
Back to Counting & Combinatorics