Math Core

Module 2.1 · Counting and Probability

Casework and organized lists

Many counting problems have no formula that fits. The reliable fallback is to split the problem into cases and count each case with an organized list. Casework shows up on almost every MATHCOUNTS and AMC 8 test, and it is the tool you reach for when you aren't sure what else to do.

Organized lists

An organized list writes the possibilities in a fixed order so that you never skip one and never write one twice. The trick is to decide in advance which quantity you change first.

Suppose you want every way to make 2525 cents from pennies, nickels and dimes. Changing coins at random is a recipe for mistakes. Instead, fix the number of dimes (the biggest coin) first, then the number of nickels, and let pennies fill in the rest.

DimesNickelsPennies
221,01, 00,50, 5
113,2,1,03, 2, 1, 00,5,10,150, 5, 10, 15
005,4,3,2,1,05, 4, 3, 2, 1, 00,5,…,250, 5, \dots, 25

That gives 2+4+6=122 + 4 + 6 = 12 ways. Once the dimes and nickels are chosen, the pennies are forced, so each row of the list really is one way.

Casework

Casework is the same idea at a larger scale: break the whole count into smaller counts you can handle, then add.

Rules for good casework

  1. Choose the cases by one feature (the first digit, the largest part, the number of a certain coin).
  2. The cases must not overlap: no possibility may be counted in two cases.
  3. The cases must cover everything: every possibility belongs to some case.
  4. Count each case separately, then add.

A good case split makes each case easy. Splitting on the most restrictive feature (the biggest coin, the largest side, the leading digit) usually works best, because it leaves the fewest choices for everything else.

Worked example: Digit sums

How many three-digit numbers have digits that add up to 55?

Split on the hundreds digit aa, which can be 11 to 55 (it can't be 00). The other two digits must add to 5−a5 - a. Two digits that add to ss can be chosen in s+1s + 1 ways (0+s0 + s, 1+(s−1)1 + (s-1), …, s+0s + 0).

aatens + unitsways
114455
223344
332233
441122
550011

Total: 5+4+3+2+1=155 + 4 + 3 + 2 + 1 = 15.

Worked example: Triangles with a fixed perimeter

How many non-congruent triangles have integer side lengths and perimeter 1212?

List the sides in order a≤b≤ca \le b \le c so each triangle is written only once. The triangle inequality says a+b>ca + b > c. Since a+b=12−ca + b = 12 - c, that means 12−c>c12 - c > c, so c<6c < 6. Also cc is the largest side, so c≥4c \ge 4.

  • c=5c = 5: a+b=7a + b = 7 with a≤b≤5a \le b \le 5: (2,5)(2, 5) and (3,4)(3, 4).
  • c=4c = 4: a+b=8a + b = 8 with a≤b≤4a \le b \le 4: (4,4)(4, 4).

The triangles are 2-5-52\text{-}5\text{-}5, 3-4-53\text{-}4\text{-}5 and 4-4-44\text{-}4\text{-}4: 33 triangles.

Worked example: Counting by the last step

In how many ways can you climb a staircase of 66 steps if each move goes up 11 or 22 steps?

Let f(n)f(n) be the number of ways to climb nn steps. Split on the last move. If it is a 11-step, the moves before it climb n−1n - 1 steps; if it is a 22-step, they climb n−2n - 2 steps. The cases don't overlap and cover everything, so

f(n)=f(n−1)+f(n−2).f(n) = f(n-1) + f(n-2).

With f(1)=1f(1) = 1 and f(2)=2f(2) = 2: f(3)=3f(3) = 3, f(4)=5f(4) = 5, f(5)=8f(5) = 8, f(6)=13f(6) = 13. There are 1313 ways.

Common mistake

The most common casework error is overlapping cases. If you count "numbers with a 33" and "numbers with a 55" as separate cases and add, you count 3535 twice. Pick a single feature to split on so each possibility lands in exactly one case.

Tip

Before adding, check one or two cases by writing them out fully. If a case seems to have a pattern (like 5,4,3,2,15, 4, 3, 2, 1 above), confirm the first and last entries and trust the pattern in between.

Practice

Practice 1

In how many ways can you make 3030 cents using nickels, dimes and quarters? (You don't have to use every kind of coin.)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

How many positive integers less than 100100 have digits that add up to 77?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

How many non-congruent rectangles have integer side lengths and a perimeter of 3030?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Two standard six-sided dice are rolled, one red and one blue. In how many of the possible outcomes is the sum of the two numbers 88?

Practice 5

In how many three-digit numbers is the middle digit the average of the other two digits? (For example, 258258 and 444444 qualify.)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

How many non-congruent triangles have integer side lengths and perimeter 1515?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

A frog climbs a ladder with 77 rungs, starting on the ground. Each jump takes it up either 11 rung or 22 rungs. In how many different ways can it reach the 77th rung?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Ava, Ben and Cal share 1010 identical candies. Each of them gets at least one candy, and Ava gets strictly more than each of the other two. In how many ways can the candies be shared?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice