Discord

INAIO Guide Stage 1 7Combinatorics and Discrete Reasoning

7.5 Enumeration and casework

List every possible outcome in a small finite problem using a table or disjoint cases, then check that none is missed or repeated.

Counting formulas are useful when a problem has a regular pattern. A short problem with several different restrictions may be easier to solve by listing the possibilities systematically. This is exhaustive enumeration: examine every relevant case exactly once. The key is a plan for the list, so that a missing or repeated case does not silently change the answer.

This is foundational to intermediate discrete reasoning. OpenStax's tables and trees show ways to list multistage outcomes; MIT's casework notes show why the cases must cover all possibilities. Review the addition and multiplication rules if a table cell itself contains several choices.

A basic idea: let one choice organise the rest

Find nonnegative integer solutions of x+y+z=6x+y+z=6 when x≤2x\le2, y≤2y\le2, and z≤3z\le3. Choose xx and yy first; then z=6−x−yz=6-x-y is forced. There are only nine (x,y)(x,y) pairs to inspect. Because z≤3z\le3, we need x+y≥3x+y\ge3. Only (1,2)(1,2), (2,1)(2,1), and (2,2)(2,2) pass. They give z=3,3,2z=3,3,2, so there are three solutions.

A three-by-three table lists x and y from zero to two. Only cells (1,2), (2,1), and (2,2) are highlighted as valid; they give z values 3, 3, and 2.A three-by-three table lists x and y from zero to two. Only cells (1,2), (2,1), and (2,2) are highlighted as valid; they give z values 3, 3, and 2.
Fix two variables, compute the third, and mark every allowed row and column pair once.

A quick tour of systematic casework

Choose an organising variable with few values, such as x=0,1,2x=0,1,2. Within each case, list the remaining choices in a fixed order. A table works well for two short ranges; a tree works when later choices depend on earlier ones. If the final choice is determined by previous ones, calculate it rather than branching over it again.

Check coverage: every valid outcome must appear somewhere. Check separation: no outcome may appear in two cases. These are the same conditions needed before adding case counts in Module 7.1. A small exhaustive list can also reveal a pattern, but a pattern noticed in a few cases is not by itself a proof for larger inputs.

Enumeration grows rapidly. Four binary choices give 24=162^4=16 candidates; twenty give over a million. For large spaces, look for a formula, an invariant, or a more efficient algorithm. Here we stay with small finite cases that can be checked completely.

Application 1: bounded solutions

Count triples of nonnegative integers satisfying x+y+z=6x+y+z=6, x,y≤2x,y\le2, and z≤3z\le3.

  1. If x=0x=0, even y=2y=2 leaves z=4z=4, so there is no solution.
  2. If x=1x=1, only y=2y=2 gives z≤3z\le3: (1,2,3)(1,2,3).
  3. If x=2x=2, y=1y=1 or 22 works: (2,1,3)(2,1,3) and (2,2,2)(2,2,2). The cases cover x=0,1,2x=0,1,2 without overlap, giving 33 solutions.

Application 2: selecting compatible features

A small model may use exactly two features from A,B,C,DA,B,C,D. If AA is selected, BB must also be selected; CC and DD cannot be selected together. How many two-feature sets are valid?

  1. List the six unordered pairs once: AB,AC,AD,BC,BD,CDAB,AC,AD,BC,BD,CD.
  2. ACAC and ADAD fail the A⇒BA\Rightarrow B rule. CDCD fails the incompatibility rule.
  3. The valid sets are AB,BC,BDAB,BC,BD: three choices. Listing unordered pairs avoids counting ABAB and BABA separately.

Resources

SourceTitleWhy read it
OpenStaxTree diagrams, tables, and outcomesPractise systematic lists and two-stage tables.
MIT OpenCourseWareLecture 3: Casework and Strong InductionSee how exhaustive cases support a complete argument.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments