Casework
MathDash
Last updated 2025-11-13
1 Introduction
s h
When faced with a complex counting problem, sometimes the best approach is to break
y
l
it into smaller, manageable pieces. This is called casework.
D
Example 1.1
a n
h O
How many 3-digit numbers contain exactly two different digits?
a t e
Before diving in, let’s understand what we’re looking for. A valid number would be like
s
112 or 323 - using exactly two different digits in some pattern.
M U
Let’s first identify all possible patterns when using two digits (call them A and B). Note
that every valid 3-digit number with exactly two different digits must fall into one of
y l
these patterns:
B rna
• AAB (A appears twice at start)
• ABA (A appears twice with B between)
• BAA (A appears twice at end)
te
Looking at this list, we can organize our counting into three main cases based on where
the repeated digit appears:
In
Case Pattern Example
1 AAB 112
2 ABA 121
3 BAA 211
Let’s count each case:
Case 1 (AAB):
• First digit A: 1-9 (9 choices, can’t be 0)
• Second digit B: 0-9 except A (9 choices)
• Total: 9 × 9 = 81 numbers
Case 2 (ABA):
• First digit A: 1-9 (9 choices)
© MathDash – All Rights Reserved
MathDash (Last updated 2025-11-13) Casework
• Second digit B: 0-9 except A (9 choices)
• Total: 9 × 9 = 81 numbers
Case 3 (BAA):
• First digit B: 1-9 (9 choices)
• Second digit A: 0-9 except A (9 choices)
• Total: 9 × 9 = 81 numbers
Total numbers = 81 + 81 + 81 = 243
Example 1.2
In how many ways can you color the vertices of a square using red, blue, and green
h
if rotations of the same coloring are considered the same?
a s ly
There are many ways to solve this with casework - the tricky part is choosing a set of
cases that keeps each case manageable!
D n
Let’s break it down by how many colors are actually used:
t h O
Case 1: Using only one color
a s e
M l U
• Choose which color: 3 choices
y
B rna
• Only one possible pattern after color choice
• Total: 3 patterns
Case 2: Using exactly two colors
te
In
Sub-cases:
• Two vertices each color:
– Choose which two colors: 3
2
= 3 ways
– After colors chosen, 2 distinct patterns after rotation (alternating or adjacent)
– Subtotal: 3 × 2 = 6 patterns
• One vertex one color, three vertices other color:
– Choose which color is used once: 3 ways
– Choose which color is used three times out of the remaining: 2 ways
– Subtotal: 3 × 2 = 6 patterns
© MathDash – All Rights Reserved 2
MathDash (Last updated 2025-11-13) Casework
• Total: 6 + 6 = 12 patterns
Case 3: Using all three colors
Adjacent Diagonal
Sub-cases based on where the repeated color appears:
• Adjacent positioning (repeated color on adjacent vertices):
– Choose which color appears twice: 3 ways
h
– Choose arrangement of other two colors: 2 ways
s y
– Subtotal: 3 × 2 = 6 patterns
a l
• Diagonal positioning (repeated color on opposite corners):
D n
– Choose which color appears twice: 3 ways
h O
– Choose arrangement of other two colors: 1 way
t
– Subtotal: 3 × 1 = 3 patterns
a s e
• Total: 6 + 3 = 9 patterns
M
Total patterns = 3 + 12 + 9 = 24 distinct colorings
y l U
Example 1.3
B rna
How many ways can you make change for 50 cents using quarters, dimes, and nick-
els?
Why split by quarters? Let’s think about our options:
te
• By quarters: 0-2 quarters possible (3 cases)
In
• By dimes: 0-5 dimes possible (6 cases)
• By nickels: 0-10 nickels possible (11 cases)
Choosing quarters gives us the fewest cases! Also, quarters being the largest coin means
each case leaves less money to handle, making sub-calculations simpler.
Let’s solve systematically:
Case Q = 2 (50¢ - 50¢ = 0¢ remaining):
• Only possibility: 2Q, 0D, 0N
• Count: 1 way
Case Q = 1 (50¢ - 25¢ = 25¢ remaining):
• Need combinations of D and N for 25¢
• Solutions: (2D,1N), (1D, 3N), (0D,5N)
© MathDash – All Rights Reserved 3
MathDash (Last updated 2025-11-13) Casework
• Count: 3 ways
Case Q = 0 (50¢ remaining):
• Solutions: (5D,0N), (4D,2N), (3D, 4N), (4D, 6N), (5D, 8N), (6D, 10N)
• Count: 6 ways
Total number of ways = 1 + 3 + 6 = 10
Notice how each case follows the same pattern:
• Fix the number of quarters
• Convert remaining amount to a simple equation
• Find all integer solutions where 𝐷 >= 0 and 𝑁 >= 0
h
This systematic approach is what makes casework powerful. Each case becomes a sim-
s
pler problem that we can solve using the same method.
a ly
D n
2 Choosing Good Cases
t h O
When approaching a problem with casework, look for these qualities:
a e
• Small number of cases (like quarters vs. dimes)
s
• Cases that are mutually exclusive (no overlap)
M U
• Cases that are exhaustive (cover all possibilities)
y l
• Cases that make the remaining problem simpler
B rna
In our three examples:
• Two-digit numbers: Cases by pattern (AABB, ABBA, ABAB) made digit selection
straightforward
e
• Square coloring: Cases by number of colors used naturally handled rotational sym-
t
metry
In
• Making change: Cases by quarters minimized case count and simplified remaining
calculations
Remark 2.1
When using casework, it’s important to verify your solution by:
• Solving the problem with different case breakdowns to confirm you get the same an-
swer
• Double-checking that your cases don’t overlap
• Verifying that your cases cover all possibilities
• Testing your solution with specific examples
A wrong casework solution often looks convincing at first glance. Taking time to verify your
work carefully can help catch mistakes before they cost you points!
© MathDash – All Rights Reserved 4
MathDash (Last updated 2025-11-13) Casework
Remark 2.2
When your casework leads to messy calculations, it’s often a sign that you should try differ-
ent cases! For example, in the change-making problem, if we had chosen cases by dimes (0D
to 20D), we would have needed to work through 21 cases!
Don’t be afraid to restart with a different approach. A good case breakdown should make
the problem simpler, not more complicated!
s h y
D a n l
a t h e O
M U s
y
B rna l
te
In
© MathDash – All Rights Reserved 5
MathDash (Last updated 2025-11-13) Casework
3 Practice Problems
Problem 1. How many 4-digit numbers contain exactly three different digits?
Problem 2. How many ways can you make change for 40¢ using quarters, dimes, and
nickels?
Problem 3. A bag contains 3 identical red marbles, 2 identical blue marbles, and 4 iden-
tical green marbles. In how many ways can you select 4 marbles if the order doesn’t
matter?
Problem 4. How many 3-digit numbers exist where each digit differs from its adjacent
digits by at most 1? (For example, 123, 321, and 111 are valid; 135 is not. Note that ”differs
h
by at most 1” means the digits can be equal or differ by 1.)
a s ly
Problem 5. In how many ways can you color the faces of a cube using red, blue, and
n
green if rotations are considered the same?
hD O
a t s e
y M l U
B rna
te
In
© MathDash – All Rights Reserved 6
MathDash (Last updated 2025-11-13) Casework
4 Practice Problems with Solutions
Problem 1. How many 4-digit numbers contain exactly three different digits?
Hint: Consider which digit must be repeated and where it can appear.
Solution: Let’s solve this systematically using casework:
First, note that we need to:
• Use exactly three different digits (call them A, B, C)
• One digit must appear twice
• The number must be 4 digits (so can’t start with 0)
h
Let’s organize by which digit appears twice and where:
s y
• AABC (repeated at start)
a l
• ABAC (repeated in first and third)
D n
• ABCA (repeated in first and last)
h O
• BAAC (repeated in second and third)
t
• BACA (repeated in second and last)
a s e
• BCAA (repeated at end)
M
Case 1: If the repeated digit is 0
U
• Can’t be used at the start, so only BAAC, BACA, BCAA are valid
y
B rna l
• First digit (B): 1-9 (9 choices)
• Other new digit (C): 1-9 except B (8 choices)
• Count: 9 · 8 · 3 = 216 numbers
e
Case 2: If the repeated digit is not 0
t
• Choose repeated digit: 1-9 (9 choices)
In
• Choose first new digit: 0-9 except repeated digit (9 choices)
• Choose second new digit: 0-9 except previous two digits (8 choices)
• All 6 patterns are valid
• Count: 9 · 9 · 8 · 6 = 3,888 numbers
Total: 216 + 3,888 = 4,104 numbers
Problem 2. How many ways can you make change for 40¢ using quarters, dimes, and
nickels?
Hint: Use quarters for casework as they’re the largest denomination.
Solution: Let’s solve this systematically by cases based on number of quarters:
© MathDash – All Rights Reserved 7
MathDash (Last updated 2025-11-13) Casework
Case Q = 1 (40¢ - 25¢ = 15¢ remaining):
• Need combinations of D and N for 15¢
• Solutions: (1D,1N), (0D,3N)
• Count: 2 ways
Case Q = 0 (40¢ remaining):
• Solutions: (4D,0N), (3D,2N), (2D,4N), (1D,6N), (0D, 8N)
• Count: 5 ways
Total ways = 2 + 5 = 7
Problem 3. A bag contains 3 identical red marbles, 2 identical blue marbles, and 4 iden-
h
tical green marbles. In how many ways can you select 4 marbles if the order doesn’t
s y
matter?
a n l
Hint: Break into cases based on how many of each color are selected.
D
Solution: Let’s organize by how many red marbles we select:
t h O
Case R = 0:
a e
• Need 4 marbles from blue and green
s
• Blue options: 0,1,2 (can’t use more than 2)
M U
• Corresponding green needed: 4,3,2
y l
• All combinations possible with available marbles
B rna
• Count: 3 ways
Case R = 1:
• Need 3 more marbles from blue and green
te
• Blue options: 0,1,2
In
• Corresponding green needed: 3,2,1
• All combinations possible
• Count: 3 ways
Case R = 2:
• Need 2 more marbles from blue and green
• Blue options: 0,1,2
• Corresponding green needed: 2,1,0
• All combinations possible
• Count: 3 ways
Case R = 3:
• Need 1 more marble from blue or green
© MathDash – All Rights Reserved 8
MathDash (Last updated 2025-11-13) Casework
• Can be either blue (1 way) or green (1 way)
• Count: 2 ways
Case R = 4:
• Not possible (only 3 red marbles available)
• Count: 0 ways
Total ways = 3 + 3 + 3 + 2 + 0 = 11 ways
Problem 4. How many 3-digit numbers exist where each digit differs from its adjacent
digits by at most 1? (For example, 123, 321, and 111 are valid; 135 is not. Note that ”differs
by at most 1” means the digits can be equal or differ by 1.)
s h
Hint: Break into cases based on the first digit, then consider valid options for subsequent
y
digits.
a l
Solution: Let’s solve this systematically:
D n
First, note that:
h O
• First digit can’t be 0 (must be 1-9)
t e
• Each subsequent digit must be within 1 of the previous digit
a s
• Equal digits are allowed
M U
Let’s organize by first digit:
y l
For first digit 1:
B rna
• Second digit must be 0,1,2
• For second digit 0: third can be 0,1
• For second digit 1: third can be 0,1,2
e
• For second digit 2: third can be 1,2,3
t
• Count: 2 + 3 + 3 = 8 numbers
In
For first digit 2:
• Second digit must be 1,2,3
• For second digit 1: third can be 0,1,2
• For second digit 2: third can be 1,2,3
• For second digit 3: third can be 2,3,4
• Count: 3 + 3 + 3 = 9 numbers
For first digits 3-7:
• Second digit must be n-1,n,n+1
• Each second digit allows three third digits
• Count: 9 numbers each
© MathDash – All Rights Reserved 9
MathDash (Last updated 2025-11-13) Casework
For first digit 8:
• Second digit must be 7,8,9
• For second digit 7: third can be 6,7,8
• For second digit 8: third can be 7,8,9
• For second digit 9: third can be 8,9
• Count: 3 + 3 + 2 = 8 numbers
For first digit 9:
• Second digit must be 8,9
• For second digit 8: third can be 7,8,9
h
• For second digit 9: third can be 8,9
s y
• Count: 3 + 2 = 5 numbers
a l
Total = 8 + 9 + ( 5 × 9) + 8 + 5 = 75 numbers
D n
Problem 5. In how many ways can you color the faces of a cube using red, blue, and
h O
t
green if rotations are considered the same?
a s e
Hint: Break into cases based on how many faces of each color are used.
M
Solution: Let the colors be R, G, B. We consider cases based on the number of distinct
U
colors used and the distribution of colors on the 6 faces. We must account for rotational
y l
symmetry.
B rna
Case 1: One color used (Monochromatic)
• All 6 faces are R, or all G, or all B.
• These 3 patterns are distinct.
e
• Count: 3 patterns.
t
Case 2: Exactly two colors used
In
3
• Choose which two colors (e.g., R and G): 2
= 3 ways.
• For a chosen pair (A, B), consider the face counts:
– 5A, 1B: The single face B is unique up to rotation. (1 pattern)
– 1A, 5B: The single face A is unique up to rotation. (1 pattern)
– 4A, 2B: The two B faces can be adjacent or opposite. (2 patterns)
– 2A, 4B: The two A faces can be adjacent or opposite. (2 patterns)
– 3A, 3B: The three A faces can meet at a vertex, or form a band around the
cube. (2 patterns)
• Total patterns for one pair of colors = 1 + 1 + 2 + 2 + 2 = 8.
• Total count for Case 2 = 3 × 8 = 24 patterns.
© MathDash – All Rights Reserved 10
MathDash (Last updated 2025-11-13) Casework
Case 3: All three colors used (R, G, B)
• Subcases by distribution of face counts (must sum to 6):
– 4-1-1 split (e.g., 4R, 1G, 1B):
3
* Choose the color for 4 faces: 1
= 3 ways.
* For 4R, 1G, 1B: The two single faces (G, B) can be opposite each other, or
adjacent to each other. These are rotationally distinct. (2 patterns).
* Count: 3 × 2 = 6 patterns.
– 3-2-1 split (e.g., 3R, 2G, 1B):
* Choose colors for counts (3, 2, 1): 3! = 6 ways to assign R,G,B to counts.
h
* For a fixed assignment (e.g., 3R, 2G, 1B), there are 3 distinct patterns under
rotation:
s ly
1. The 3 R faces meet at a corner. The single B face is on the opposite
a
side. The 2 G faces are opposite each other.
D n
2. The 3 R faces meet at a corner. The single B face is next to that corner.
h O
The 2 G faces share an edge on the opposite side.
t
3. The 3 R faces make a ring around the middle. The single B face is
a e
on one end. The 2 G faces are opposite each other on the remaining
s
sides.
M U
* Count: 6 (assignments) × 3 (patterns per assignment) = 18 patterns.
l
– 2-2-2 split (2R, 2G, 2B):
y
B rna
* There are 6 distinct patterns for this distribution:
1. All pairs opposite: R faces opposite, G opposite, B opposite. (1 pattern)
2. One pair opposite, two pairs adjacent: Choose the color pair that is
e
opposite (3 ways). E.g., R opposite R, G adjacent G, B adjacent B. (3
t
patterns)
In
3. All pairs adjacent: This makes two different patterns that can’t be
rotated to match each other. (2 patterns)
* Count: 1 + 3 + 2 = 6 patterns.
• Total count for Case 3 = 6 + 18 + 6 = 30 patterns.
Total distinct colorings = Case 1 + Case 2 + Case 3
Total = 3 + 24 + 30 = 57 distinct colorings
© MathDash – All Rights Reserved 11