Method line M18 · When and why do we use it?

Cases and Enumeration

In the Chinese book: 分类与枚举

Split by one rule, no overlaps and no gaps, so each case is an easy problem.

📖 §4.3 of 《解题方法与策略》

One idea, one pictureSlide the window of width 3 from left to right. Where is the minimum ● reached at first? Where does it move to later? How many times does it switch?

Loading figure…

In one sentence

Use one ruler all the way through: no overlaps, no gaps.

Some problems cannot be done in one go, because “different situations need different methods”. So do them separately. Case analysis has just three rules:

  1. One rule for splitting: split by one thing at a time (by the longest side, by the remainder, by where the axis of symmetry is…).
  2. No overlaps: every situation falls into exactly one case.
  3. No gaps: all the cases together cover every situation.

Once you have split, each case knows one more fact than the original problem, so it becomes easier.

Predict first

The parabola has axis of symmetry . To find its minimum on the interval , how many cases do you need when you split by “where the axis is relative to the interval”?

Choose an answer first; then you can see the result.

Stop 1 · Maxima and minima of quadratic functions (Vol. 3)

Example: find the minimum of y = x² − 2x − 3 on [p, p + 3]

Step 1 / 5
Loading figure…
  1. First choose the rule

    Complete the square: , axis , opening upward. Where the minimum is reached depends only on which side of the interval the axis is on.

A boundary point may go into either case, but only into one. The values from the two sides should agree at the boundary: a good way to check that your cases are right.

Stop 2 · Equations with letter coefficients (Vol. 2)

When solving , the step “divide by ” is only allowed when . An equation with letter coefficients needs case analysis from the start.

Example: solve m²x − 1 = x + m for x

Step 1 / 5
  1. Rearrange to ax = b

    Move the terms with to the left and the rest to the right, then factor both sides.

Both have “coefficient ”, but one has infinitely many solutions and the other has none. That is why they cannot be merged into one case.

Stop 3 · Counting (Vol. 7)

The worst way to count is to count in a muddle. Line the objects up by one rule, and each case can be counted at a glance.

How many triangles have integer side lengths and perimeter ? (Triangles with the same three sides count as one.)

Example: integer-sided triangles with perimeter 15

Step 1 / 6
Loading figure…
  1. Sort first, so nothing repeats

    Agree that . Then and are counted only once: that is “no overlaps”.

Stop 4 · Diophantine equations (Vol. 6)

There are infinitely many integers, so you cannot try them one by one. But split by the remainder on division by , and all integers fall into just cases: infinitely many situations become five.

Example: prove that n² + n + 1 is never a multiple of 5

Step 1 / 4
  1. The rule: the remainder of n on division by 5

    Every integer can be written as with . No overlaps, no gaps: exactly five cases.

Practice

Exercise 1Basic

How many triangles have integer side lengths and perimeter ?

Exercise 2Advanced

The equation in has no solution. Find .

Exercise 3Challenge

The minimum of on the interval is . Find all possible values of (separated by commas).

Mistake Museum · Exhibits from this stop

Before you leave, look at the traps other people fell into here.See every exhibit in the museum →

Exhibit

Dividing without checking for zero

The wrong step: Solve for : divide both sides by to get .
What went wrong? Think first, then open

Diagnosis When , , and you cannot divide by . The equation is then , and every number is a solution, not just .

The right step: Split into cases first: if , ; if , can be any number. Whenever you divide by an expression with letters in it, first ask whether it can be .

“Before dividing by a letter, ask whether it can be zero”

Exhibit

Forgetting each case’s own conditions

The wrong step: An isosceles triangle has perimeter and integer sides. Sorting by the length of the equal sides, they can be , so there are triangles.
What went wrong? Think first, then open

Diagnosis Each case has to pass two tests. The base must be positive, so ; the two equal sides must add up to more than the base, , so . With equal sides there is no triangle at all (for example ).

The right step: The equal sides can only be or : and , so triangles. Splitting into cases only cuts the problem into pieces; the conditions inside each piece still have to be checked one by one.

“After working out each case, go back and check that case’s conditions”

Stops on this line

The same idea, used once in each of several places.

  1. CountingVol. 7 Fun Problems in Combinatorics, ch. 1
  2. Linear Equations with Letter CoefficientsVol. 2 Equations and Systems of Equations, ch. 3
  3. Maxima and Minima of FunctionsVol. 3 Linear and Quadratic Functions, ch. 5
  4. Common Methods for Diophantine EquationsVol. 6 Divisibility, Congruences and Diophantine Equations, §3.2