Hello! In our last module, we focused on proving whether certain combinatorial arrangements were possible or impossible using clever invariants and coloring arguments. We answered questions like "Can this board be tiled?" Now, we're shifting our focus from existence to enumeration. We want to answer questions like "In how many ways can this be done?" or "What is the maximum number of objects we can create?"
This brings us to a powerful technique at the heart of combinatorics: recurrence relations. A recurrence relation defines a sequence by expressing each term as a function of its predecessors. This allows us to solve complex counting problems by breaking them down into smaller, more manageable subproblems.
Today's lesson is the first step in this new direction. Our goal is to master the art of formulating recurrence relations for various combinatorial problems. We won't focus on solving them just yet—that's for our next lesson. Instead, we'll concentrate on translating a problem's description into a recursive formula. This is the crucial skill that unlocks the ability to solve a wide range of counting problems, including the "pizza cutting problem" you were interested in.
The Essence of Recurrence Relations
At its core, a recurrence relation is a recipe for generating the terms of a sequence. It tells you how to find the n-th term, , if you know the previous terms, like , , and so on. To get started, a recurrence also needs one or more initial conditions or base cases, which are the first few terms of the sequence given explicitly.
The general strategy to find a recurrence relation for a counting problem is to:
- Define as the quantity you want to count for a problem of "size" .
- Analyze how a problem of size can be constructed from solutions to smaller problems (size , , etc.). This often involves considering the last object added, the first choice made, or partitioning the set of solutions into disjoint cases.
- Use the sum and product rules to write an equation for in terms of earlier terms in the sequence.
Let's see this strategy in action with a classic example.
Example: Binary Strings with Restrictions
How many binary strings of length n are there that do not contain two consecutive 1s? Let's call this number .
A direct counting approach is difficult because the placement of a 1 depends on its neighbors. Instead, let's build the solution for size n from smaller sizes. A valid string of length n must end in either a 0 or a 1.
-
Case 1: The string ends in a 0.
If the last digit is 0, the first digits can form any valid binary string of length without consecutive 1s. By definition, there are such strings. -
Case 2: The string ends in a 1.
If the last digit is 1, the(n-1)-th digit must be 0 to avoid having "11". So the string must look like...01. The first digits can form any valid string of length . There are such strings.
Since these two cases are disjoint, we can use the sum rule to get our recurrence relation:
This is the famous Fibonacci recurrence! To complete it, we need base cases.
- For , the valid strings are "0" and "1". So, .
- For , the valid strings are "00", "01", and "10". So, .
The following resources walk through this exact reasoning. The video provides a nice visual walkthrough of the logic.
HOMOGENEOUS RECURRENCE RELATIONS - Discrete Mathematics
This video from TrevTutor explains how to derive a recurrence relation from a word problem.
Watch the segment from this timestamp. The presenter details the case-by-case analysis for binary strings with no consecutive ones, leading to the Fibonacci recurrence.
This document from the Canadian Mathematical Society provides several excellent examples of formulating recurrences.
Read the first example in the document, starting from this section. It formalizes the argument we just discussed. Notice how the problem is broken down into sets B (strings starting with 0) and C (strings starting with 1) to derive the same relation.
The Plane Division Problem
You mentioned being interested in the "pizza cutting problem." This is formally known as the plane division problem. The question is: what is the maximum number of regions, , that a plane can be divided into by n straight lines?
To find the maximum, we must ensure that no two lines are parallel and no three lines intersect at the same point.
Let's start by exploring small cases, which is almost always a good idea in combinatorics.

From the image and some thought, we can tabulate the first few values:
- (the plane itself)
- If you draw it carefully, you'll find .
The sequence is . The differences between consecutive terms are . This pattern strongly suggests a recurrence. Let's formalize it.
Suppose we have already drawn lines, creating regions. Now, we add the n-th line. To maximize the new regions created, this new line must intersect all n-1 of the previous lines, and it must do so at distinct points.
When the n-th line crosses the n-1 existing lines, it gets divided into n segments. Each of these n segments cuts through one of the old regions, splitting it into two. This adds exactly n new regions to our total.
Therefore, the recurrence relation is:
with the base case .
The following resources provide a great walkthrough and formal derivation of this result.
Lines in a Plane - Recursion and Proof by Induction
This SnugglyHappyMathTime video offers a friendly and visual introduction to the plane division problem.
Watch the video up to this point. The presenter works through the small cases by drawing them and intuits the recurrence relation L_n = L_{n-1} + n by observing the pattern of added regions.
[PDF] Recurrence Relations and Their Solutions (Problem : Steiner's ...
This document provides a more formal, mathematical treatment of the plane division problem.
Read from the start of the paper down to the final formula for Ln. Pay close attention to the argument under the heading "What happens if there are n lines?". This section formalizes the logic that the n-th line adds n new regions.
Generalizing to 3D: The Space Division Problem
For a challenge worthy of Olympiad preparation, let's extend this to three dimensions. What is the maximum number of regions, , that 3D space can be divided into by n planes?

The logic is analogous. Let's assume we have already placed planes, creating regions. We now add the n-th plane. To maximize the new regions, this new plane must intersect all n-1 previous planes.
What does the intersection look like? The intersection of our new n-th plane with the n-1 old planes is a set of n-1 lines on the new plane. To maximize everything, these n-1 lines must also be in "general position" (no two parallel, no three concurrent).
These n-1 lines on the new plane divide it into planar regions (our previous problem!). Each of these planar regions on the new plane acts as a blade, slicing through one of the existing 3D regions and dividing it into two.
This means that adding the n-th plane creates new 3D regions. Thus, the recurrence relation is:
with the base case . Notice how we've defined the solution to a 3D problem in terms of the solution to a 2D problem!
[PDF] Recurrence Relations and Their Solutions (Problem : Steiner's ...
The same document also covers this 3D generalization.
Now, read the section titled "Planes in the Space" and continue until you reach the recurrence relation P_{n+1} = P_n + L_n. This directly connects the 3D problem to the 2D one.
Practice Problems
Now it's your turn to formulate recurrences. For each problem, define your sequence and find the relation and its base cases. You don't need to solve for a closed-form solution.
-
The Tower of Hanoi: You have three pegs and
ndisks of different sizes. Initially, all disks are on the first peg in order of size, smallest on top. You can move one disk at a time, and you can never place a larger disk on top of a smaller one. Let be the minimum number of moves required to transfer allndisks from the first peg to the third peg. Find a recurrence for . -
Ternary Numbers without Double Zeros: Let be the number of
n-digit ternary strings (using digits 0, 1, 2) that do not contain "00" as a substring. Find a recurrence for . (Hint: Condition on the last digit. If the last digit is 0, what must the(n-1)-th digit be?) -
Ordered Sums of Odd Integers: For , let be the number of ways to write
nas an ordered sum of odd positive integers. For example, because , , and . Find a recurrence for . (Hint: Consider the last number in the sum. What if it's 1? What if it's greater than 1?)
These problems will help you solidify the core skill of recursive thinking. The logic you develop here is fundamental to a huge portion of advanced combinatorics.
Conclusion
Today, we've taken our first major step into the world of enumerative combinatorics by learning how to frame problems recursively. The key takeaway is the strategy of decomposition: breaking a large problem into smaller, self-similar instances. We saw this in action with restricted binary strings and, most notably, in the plane and space division problems. By considering the effect of adding just one more element—one more digit, one more line, one more plane—we were able to define the solution for size n in terms of solutions for smaller sizes.
We have focused exclusively on formulating these relations. In our next lesson, we will learn how to solve them. Specifically, we'll cover the characteristic equation method, a powerful algebraic technique for finding a closed-form solution (like ) directly from a recurrence relation like . This will complete the journey from a recursive definition to an explicit formula.