The Central Idea

Suppose a finite set of outcomes \(S\) is divided into cases

\[ S_1,S_2,\ldots,S_k \]

such that every outcome belongs to exactly one case.

Then

\[ S=S_1\cup S_2\cup\cdots\cup S_k \]

and the cases are pairwise disjoint.

Therefore,

\[ \boxed{|S|=|S_1|+|S_2|+\cdots+|S_k|}. \]

Cases Are a Partition

A good case split has two properties.

  1. Exhaustive: every valid outcome belongs to some case.
  2. Disjoint: no valid outcome belongs to more than one case.

When both properties hold, the cases form a partition of the outcome set.

A First Example

Count the integers from \(1\) through \(20\) that are either even or odd.

Every integer belongs to exactly one of the two cases:

There are \(10\) even integers and \(10\) odd integers.

Therefore,

\[ \boxed{10+10=20}. \]

Why Cases Help

A complicated counting rule may behave differently under different circumstances.

Splitting into cases lets us replace one irregular problem with several regular problems.

Within each case, the product principle, complementary counting, or another counting tool may become easy to apply.

Example: Two Code Formats

A code has one of two formats:

Repetition is allowed.

Case 1:

\[ 26\cdot10^2=2600. \]

Case 2:

\[ 26^2\cdot10=6760. \]

Since the formats are distinct,

\[ \boxed{2600+6760=9360}. \]

Case Labels Should Reflect Structure

Useful cases are usually based on a feature that changes the number of later choices.

Common case labels include:

Casework and the Sum Principle

Counting by cases is an organized use of the sum principle.

The difference is that the cases are often constructed by the solver rather than given explicitly in the problem.

The sum principle then combines the case totals.

Casework and the Product Principle

Within a case, sequential choices are often counted by multiplication.

A common pattern is

\[ \boxed{ \text{total} = (\text{product for case 1}) + (\text{product for case 2}) +\cdots }. \]

Example: Restricted Two-Digit Numbers

Count two-digit positive integers whose digits have different parity.

Split into two cases:

Case 1: Odd Tens, Even Ones

The tens digit has \(5\) odd choices:

\[ 1,3,5,7,9. \]

The ones digit has \(5\) even choices:

\[ 0,2,4,6,8. \]

Therefore,

\[ 5\cdot5=25. \]

Case 2: Even Tens, Odd Ones

The tens digit must be nonzero and even:

\[ 2,4,6,8. \]

So there are \(4\) choices for the tens digit and \(5\) odd choices for the ones digit.

\[ 4\cdot5=20. \]

Adding the two disjoint cases gives

\[ \boxed{25+20=45}. \]

Cases Should Not Overlap

If two cases can contain the same outcome, simple addition overcounts.

In the parity example, a number cannot simultaneously have an odd tens digit and an even tens digit.

The cases are therefore disjoint.

Cases Must Cover Everything

A case split can also fail by omitting valid outcomes.

Before counting, ask:

Can every valid outcome be placed into one of my cases?

If the answer is no, the case list is incomplete.

Example: Strings by First Symbol

Suppose a three-character string is formed from the symbols

\[ \{A,B,C,D\}, \]

but strings beginning with \(A\) may use only \(B\) or \(C\) in the second position, while strings beginning with \(B,C,\) or \(D\) may use any symbol in later positions.

The first symbol changes the available continuations, so it is natural to split by the first symbol.

Case 1: First Symbol \(A\)

The first position is fixed as \(A\).

The second position has \(2\) allowed choices, and the third has \(4\) choices.

\[ 1\cdot2\cdot4=8. \]

Case 2: First Symbol Not \(A\)

The first position has \(3\) choices:

\[ B,C,D. \]

Each remaining position has \(4\) choices.

\[ 3\cdot4\cdot4=48. \]

Therefore,

\[ \boxed{8+48=56}. \]

Split Where the Rule Changes

The previous example illustrates a major strategy:

Split into cases at the point where the counting rule changes.

This often converts an irregular branch structure into a short list of regular products.

Counting by Number of Special Objects

Another common strategy is to classify outcomes by how many times a particular type of object appears.

For example, a string might contain:

These cases are naturally disjoint because a string cannot contain two different numbers of vowels at once.

Example: Three-Letter Strings with at Most One Vowel

Use \(5\) vowels and \(21\) consonants, with repetition allowed.

The condition “at most one vowel” suggests two cases:

Case 1: No Vowels

Every position contains a consonant:

\[ 21^3. \]

Case 2: Exactly One Vowel

Choose the position of the vowel:

\[ 3. \]

Choose the vowel:

\[ 5. \]

Choose consonants for the remaining two positions:

\[ 21^2. \]

Therefore,

\[ 3\cdot5\cdot21^2. \]

The total is

\[ \boxed{21^3+3\cdot5\cdot21^2}. \]

Exactly, At Most, and At Least

Casework is especially natural when a condition is expressed using:

These conditions can often be decomposed into disjoint exact-count cases.

Example: At Least Two Successes

Suppose a five-stage binary process records success \(S\) or failure \(F\).

“At least two successes” can be split into:

This is valid casework because the number of successes uniquely determines the case.

Direct Casework versus Complementary Counting

The previous example can be counted by cases, but the complement may be shorter:

\[ \text{at least two successes} \]

has complement

\[ \text{zero or one success}. \]

A good solver compares the case structure in both directions and chooses the simpler route.

Example: Committees with a Distinguished Person

A \(4\)-person committee is chosen from \(10\) people, one of whom is Alex.

Split the committees into two cases:

Committee Case Counts

If Alex is included, choose the other \(3\) members from the remaining \(9\):

\[ \binom{9}{3}. \]

If Alex is excluded, choose all \(4\) members from the remaining \(9\):

\[ \binom{9}{4}. \]

Therefore,

\[ \boxed{ \binom{10}{4} = \binom{9}{3} + \binom{9}{4} }. \]

This is Pascal's identity interpreted as counting by cases.

Casework Can Prove Identities

When one finite set is partitioned into disjoint cases, the resulting count can produce a combinatorial identity.

The identity is true because both sides count the same objects, but one side counts them all at once while the other counts them case by case.

Example: Largest Element of a Subset

Count the \(k\)-element subsets of

\[ \{1,2,\ldots,n\} \]

by their largest element.

If the largest element is \(j\), then the remaining \(k-1\) elements must be selected from

\[ \{1,2,\ldots,j-1\}. \]

Therefore, that case contains

\[ \binom{j-1}{k-1} \]

subsets.

A Case-Sum Identity

The possible largest elements are

\[ j=k,k+1,\ldots,n. \]

Adding the case counts gives

\[ \boxed{ \binom{n}{k} = \sum_{j=k}^{n}\binom{j-1}{k-1} }. \]

This is sometimes called the hockey-stick identity in Pascal's triangle.

Cases Can Be Nested

A complicated case may itself be divided into smaller subcases.

The structure can be hierarchical:

\[ \text{total} = \text{case A} + \text{case B}, \]

while

\[ \text{case B} = \text{subcase B1} + \text{subcase B2}. \]

Decision trees provide a visual representation of this nested case structure.

Example: Codes by First Character Type

A four-character code may begin with a letter or a digit.

If it begins with a letter, the remaining positions follow one rule.

If it begins with a digit, the remaining positions follow another.

The first-character type is therefore a natural top-level case split.

Cases by Parity

Parity often creates useful disjoint cases.

An integer is exactly one of:

\[ \text{even} \qquad\text{or}\qquad \text{odd}. \]

Likewise, a sum may be classified according to whether its components have even or odd parity.

Example: Pairs with Even Sum

Choose an ordered pair

\[ (a,b) \]

from

\[ \{1,2,\ldots,10\}^2. \]

Count pairs for which \(a+b\) is even.

An even sum occurs in exactly two cases:

Counting the Even-Sum Cases

There are \(5\) even numbers and \(5\) odd numbers in

\[ \{1,2,\ldots,10\}. \]

Even-even pairs:

\[ 5\cdot5=25. \]

Odd-odd pairs:

\[ 5\cdot5=25. \]

Therefore,

\[ \boxed{25+25=50}. \]

Cases by Remainder Class

Congruence classes also create natural partitions.

Every integer has exactly one remainder modulo \(m\):

\[ 0,1,\ldots,m-1. \]

Therefore, a counting problem involving modular conditions can often be split by remainder.

Cases by a Distinguished Position

Strings and arrangements can often be classified by:

The best position is the one that makes the remaining choices easiest to count.

Cases by a Distinguished Element

In subset and committee problems, ask whether a particular element is included.

This produces the disjoint split

\[ \text{contains }x \qquad\text{or}\qquad \text{does not contain }x. \]

This pattern appears repeatedly in recursive identities.

Casework and Recursive Counting

Some recurrence relations arise by splitting objects according to their first or last structural choice.

Each case reduces to a smaller version of the original problem.

The next lessons on recursive counting will develop this idea systematically.

Casework and Inclusion–Exclusion

Counting by cases works best when the cases are disjoint.

If natural categories overlap, either refine them into nonoverlapping cases or use inclusion–exclusion.

The choice depends on which representation is cleaner.

Refining Overlapping Cases

Suppose outcomes may satisfy properties \(A\) and \(B\).

The overlapping categories

\[ A,\qquad B \]

can be refined into the disjoint cases

\[ A\setminus B,\qquad B\setminus A,\qquad A\cap B. \]

These three regions do not overlap.

Choosing the Right Number of Cases

Too few cases may leave complicated rules inside each case.

Too many cases may create unnecessary bookkeeping.

Good casework uses the smallest number of cases that makes each case easy to count.

Symmetric Cases

Sometimes several cases have identical counts because of symmetry.

Instead of computing each one separately, count one representative case and multiply by the number of symmetric cases.

This combines casework with the product principle.

Example: Exactly One Special Position

A four-character string contains exactly one occurrence of \(X\), and each non-\(X\) position has \(5\) choices.

There are \(4\) symmetric cases according to the position of \(X\).

Each case has

\[ 5^3 \]

strings.

Therefore,

\[ \boxed{4\cdot5^3}. \]

Common Error: Overlapping Cases

Suppose one case is

\[ \text{“contains an }A\text{”} \]

and another is

\[ \text{“contains a }B\text{.”} \]

A string containing both belongs to both cases.

Adding the case totals directly would overcount.

Common Error: Missing a Case

If a problem is divided into:

but the original condition allows zero or three special symbols, the case split is incomplete.

Common Error: Counting the Same Case Two Different Ways and Adding

Two formulas may be alternative methods for counting the same case.

They should not be added unless they represent disjoint collections.

Always ask whether the formulas count different outcomes or merely describe the same outcomes differently.

Common Error: Using Case Labels That Do Not Determine the Rule

A useful case split should simplify the remaining choices.

If the same complicated restriction still behaves differently inside a case, the case may need further refinement.

Common Error: Forgetting the Sum at the End

Counting each case separately is only part of the solution.

If the cases form a partition, the final step is to add:

\[ \boxed{|S|=\sum_i |S_i|}. \]

A Reliable Procedure

  1. Define the complete set of valid outcomes.
  2. Identify a feature that naturally separates the outcomes.
  3. Create cases that cover every valid outcome.
  4. Check that no outcome belongs to more than one case.
  5. Count each case using the simplest available method.
  6. Exploit symmetry when several cases have the same size.
  7. Add the case totals.
  8. Check whether a complement or inclusion–exclusion would have been simpler.

Example: Full Casework Workflow

Count three-digit positive integers whose first and last digits have the same parity.

Split into two disjoint cases:

Case 1: odd first digit and odd last digit.

\[ 5\cdot10\cdot5=250. \]

Case 2: even nonzero first digit and even last digit.

\[ 4\cdot10\cdot5=200. \]

Therefore,

\[ \boxed{250+200=450}. \]

Practice 1: Two Formats

A code is either one letter followed by one digit or two digits followed by one letter. Repetition is allowed. How many codes are possible?

Practice 2: Same Parity

How many ordered pairs

\[ (a,b)\in\{1,2,\ldots,8\}^2 \]

have \(a\) and \(b\) with the same parity?

Practice 3: Different Parity

How many two-digit positive integers have digits of different parity?

Practice 4: Distinguished Committee Member

A \(5\)-person committee is chosen from \(12\) people, including Jordan. Express the total number of committees as the sum of the cases “Jordan is included” and “Jordan is excluded.”

Practice 5: At Most One Vowel

How many two-letter strings contain at most one vowel, assuming \(5\) vowels, \(21\) consonants, and repetition allowed?

Practice 6: Exactly One \(X\)

A four-character string is formed from \(\{X,A,B,C\}\). How many strings contain exactly one \(X\)?

Practice 7: Even Sum

How many ordered pairs from

\[ \{1,2,\ldots,12\}^2 \]

have an even sum?

Practice 8: Split by First Digit

Count three-digit positive integers whose first digit is either \(1\) or greater than \(1\). Verify that the case totals sum to \(900\).

Practice 9: Largest Element

How many \(3\)-element subsets of

\[ \{1,2,3,4,5,6\} \]

have largest element \(5\)?

Practice 10: Identify the Error

A student counts strings containing \(A\) or \(B\) by adding the case “contains \(A\)” to the case “contains \(B\).” What problem can occur?

Practice Answers

Practice 1

Case 1:

\[ 26\cdot10=260. \]

Case 2:

\[ 10^2\cdot26=2600. \]

Therefore,

\[ \boxed{260+2600=2860}. \]

Practice 2

There are \(4\) even numbers and \(4\) odd numbers.

Even-even:

\[ 4\cdot4=16. \]

Odd-odd:

\[ 4\cdot4=16. \]

Therefore,

\[ \boxed{32}. \]

Practice 3

Odd tens and even ones:

\[ 5\cdot5=25. \]

Even nonzero tens and odd ones:

\[ 4\cdot5=20. \]

Therefore,

\[ \boxed{45}. \]

Practice 4

Jordan included:

\[ \binom{11}{4}. \]

Jordan excluded:

\[ \binom{11}{5}. \]

Therefore,

\[ \boxed{ \binom{12}{5} = \binom{11}{4} + \binom{11}{5} }. \]

Practice 5

No vowels:

\[ 21^2. \]

Exactly one vowel:

\[ 2\cdot5\cdot21. \]

Therefore,

\[ \boxed{21^2+2\cdot5\cdot21=651}. \]

Practice 6

Choose the position of \(X\):

\[ 4. \]

Each remaining position has \(3\) non-\(X\) choices:

\[ \boxed{4\cdot3^3=108}. \]

Practice 7

There are \(6\) even and \(6\) odd numbers.

\[ 6^2+6^2=36+36. \]

Therefore,

\[ \boxed{72}. \]

Practice 8

First digit \(1\):

\[ 1\cdot10\cdot10=100. \]

First digit greater than \(1\):

\[ 8\cdot10\cdot10=800. \]

Therefore,

\[ \boxed{100+800=900}. \]

Practice 9

If \(5\) is the largest element, choose the other two elements from

\[ \{1,2,3,4\}. \]

Thus,

\[ \boxed{\binom{4}{2}=6}. \]

Practice 10

The cases can overlap. A string containing both \(A\) and \(B\) belongs to both cases and would be counted twice.

The cases must be refined into disjoint cases or the overlap must be corrected using inclusion–exclusion.

What to Remember

Counting by cases partitions one outcome set into disjoint pieces:

\[ \boxed{|S|=|S_1|+|S_2|+\cdots+|S_k|}. \]

The central habit is to design cases that make the remaining counting simple.

Where We Go Next

Counting by cases simplifies a problem by separating different structural situations. Many problems add another difficulty: some potential outcomes are forbidden, constrained, or conditionally available.

The next lesson, Counting with Restrictions, develops systematic methods for incorporating those constraints into counting arguments.