01 · Opening Scenario: Tomorrow's Backlog
A support desk starts with 12 requests waiting. At each daily update, five new requests arrive and three are handled. What number will be waiting after the next update? After three updates?
Predict informally: The first update changes 12 to 14, because 12+5−3=14. If the same numbers apply again, the backlog becomes 16, then 18. Our main question is: How can a rule for the next value describe a whole sequence?
Requests waiting
Five arrive; three handled
Updated backlog
We will express the same reasoning mathematically, check several steps, and then consider what the system is entitled to predict.
02 · Learning Objectives and Three-Hour Guide
By the end of Week 10, you should be able to read an initial condition and a one-step recurrence; calculate terms by repeated substitution; compare a simple recurrence with an explicit rule; trace a small recursive definition; distinguish recursion from iteration; and state the assumptions behind a growth model.
| Class time | Essential work |
|---|---|
| 55 min | Backlog scenario, initial value, recurrence model |
| 50 min | Repeated substitution, term table, explicit comparison |
| 45 min | Recursive function and a small hand trace |
| 30 min | Pass the Value, visualization, exit check |
Classroom essentials Sections 01–10 and Practice 1–5. Optional self-study The Colab checks and Practice 6–7. Work out the mathematics before running code.
03 · The Initial Condition Anchors the Rule
A recurrence describes one value using a previous value. To obtain actual numbers, we also need a starting value, called an initial condition. We label the starting backlog B₀=12. Here B₀ means the backlog before any daily update, not the count on a mysterious Day 0.
| Updates completed n | Meaning | Backlog Bₙ |
|---|---|---|
| 0 | Starting snapshot | 12 |
| 1 | After one update | 14 |
| 2 | After two updates | 16 |
| 3 | After three updates | 18 |
04 · One Step at a Time
The desk gains five requests and removes three at each update. Its net change is +2. Therefore, for every update we choose to model, the next backlog is the current backlog plus 2:
The subscript n+1 means “after one more update.” Read the second line in words: take the backlog after n updates and add two to obtain the backlog after n+1 updates. This is a one-step recurrence relation.
What the two lines do
The initial line gives B₀=12. The recurrence gives B₁=B₀+2=14. Applying the same recurrence again gives B₂=B₁+2=16. Neither line is complete on its own for calculating this particular sequence.
05 · Repeated Substitution Builds the Terms
To find a later value, repeatedly replace “previous backlog” with the value already found. Keep the index beside every result so the number of updates remains clear.
B₀=12 (starting snapshot)
B₁=B₀+2=12+2=14
B₂=B₁+2=14+2=16
B₃=B₂+2=16+2=18
B₄=B₃+2=18+2=20
Each row uses exactly one earlier result. A term table is especially useful when the update depends on the current value and no simple direct formula is apparent.
06 · Next-Step Rule Versus Direct Term Rule
From Week 9, an explicit rule calculates a term directly from its index. In the backlog model, each of the n updates adds 2 to the starting 12, giving Bₙ=12+2n for n≥0.
| Form | How to find B₄ | What it emphasizes |
|---|---|---|
| Recurrence: B₀=12; Bₙ₊₁=Bₙ+2 | 12 → 14 → 16 → 18 → 20 | How one update changes the current value |
| Explicit: Bₙ=12+2n | B₄=12+2(4)=20 | A value from its index directly |
These two descriptions agree for this stated model. To compare them, check both the initial value and the update: the direct rule gives B₀=12, and Bₙ₊₁−Bₙ=[12+2(n+1)]−[12+2n]=2. This short check explains why the same terms appear; a few matching entries alone would be weaker evidence for a general claim.
07 · Two Other Simple Models
The structure “initial value + update” applies beyond backlogs. A balance starts at 20 units and receives 5 units each step: A₀=20, Aₙ₊₁=Aₙ+5. Its first values are 20,25,30,35. A simulated count starts at 2 and doubles each step: W₀=2, Wₙ₊₁=2Wₙ. Its first values are 2,4,8,16.
| Model | What changes each step? | First four terms, n=0..3 |
|---|---|---|
| Backlog B | Add 2 | 12, 14, 16, 18 |
| Balance A | Add 5 | 20, 25, 30, 35 |
| Simulated count W | Multiply by 2 | 2, 4, 8, 16 |
Adding a fixed amount gives a linear term pattern in these examples; multiplying by a fixed factor gives a geometric pattern. The doubling example is only a stipulated simulation. It does not assert that real requests, savings, or people double indefinitely.
08 · Pass the Value
Predict → Test → Explain Select a model, read its initial value and update, and predict the next term before revealing it. Repeat to build a term table. The interactive version stops after five updates, keeping every case small enough to trace by hand.
Which value comes next?
B₀=12; Bₙ₊₁=Bₙ+2.
Start with the initial value. Apply one update.
Printable Pass the Value
For each model, write the next four terms. Circle the initial condition, then show at least two update steps.
| Model and update | n=0 | n=1 | n=2 | n=3 | n=4 |
|---|---|---|---|---|---|
| B₀=12; Bₙ₊₁=Bₙ+2 | 12 | ____ | ____ | ____ | ____ |
| A₀=20; Aₙ₊₁=Aₙ+5 | 20 | ____ | ____ | ____ | ____ |
| W₀=2; Wₙ₊₁=2Wₙ | 2 | ____ | ____ | ____ | ____ |
Explain: What happens to the index after each update? Why is the initial value necessary?
_______________________________________________________________________
09 · What a System Can and Cannot Predict
A support dashboard can use B₀=12 and Bₙ₊₁=Bₙ+2 to display a modelled backlog of B₄=20 after four updates. The input assumptions are explicit: every step has five arrivals and three handled requests, counts are accurate, and the same rule remains in force.
If actual arrivals or completions vary, that recurrence needs different inputs or an updated rule. For example, if only one request arrives in a later step and three are handled, the net change for that step would be −2, not +2. In this chapter all backlog values are positive, so we do not need a separate rule for what happens when the queue empties.
Scenario → Mathematics → System
Scenario: requests wait and change daily. Mathematics: an initial backlog and one update rule generate a sequence. System: the dashboard reports values conditional on those assumptions, not guaranteed observations of future days.
10 · A Recursive Function Says the Same Thing
A recursive definition states a starting case and describes later outputs using an earlier output of the same function. Let f(n) be the modelled backlog after n updates:
To calculate f(3), we need f(2); that needs f(1); that needs f(0). Then work back from the known starting case:
f(3) → f(2) → f(1) → f(0)=12
f(1)=12+2=14, f(2)=14+2=16, f(3)=16+2=18.
The initial case is also the stopping point for this calculation. Without it, we keep asking for an earlier value and never reach a number. This is the same sequence as Bₙ, written as a function of n.
11 · Optional Colab: Iterate, Then Trace Recursion
Self-study · mathematics first Complete the backlog term table and trace f(3) on paper. Python is a check of those answers. We use a list and loop already seen in Week 9, then a short function.
1 · Reuse a loop to generate terms
Start with 12. The list initially stores B₀. In range(5), Python supplies the integers 0,1,2,3,4: one pass for each of five updates. append puts the newly calculated value at the end of the list; values[-1] reads its last stored value.
values = [12]
for step in range(5):
next_value = values[-1] + 2
values.append(next_value)
print(values)
Predict [12, 14, 16, 18, 20, 22]. The list has six terms: the initial term and five updates. This loop is iteration: it repeats an update using the most recent value.
2 · State a recursive function
The name backlog stands for the function f. def defines it; if n == 0 tests the stopping case; return gives the result back. Otherwise the function asks for the preceding result and adds 2.
def backlog(n):
if n == 0:
return 12
return backlog(n - 1) + 2
print(backlog(3))
Predict 18. Trace the request as backlog(3) → backlog(2) → backlog(1) → backlog(0), then return 12, 14, 16, 18. Use only small nonnegative whole-number inputs here; the definition has no stopping case for negative input.
3 · Explain the comparison
Both snippets use the same starting value and +2 update, so their small outputs agree. The loop moves forward from a stored value; the function asks for smaller input until it reaches its stopping case. Write one sentence explaining which mathematical line is represented by return 12 and which by return backlog(n - 1) + 2.
12 · Practice
Show the starting value and at least two intermediate terms. Selected solutions follow at the end.
- u₀=7, uₙ₊₁=uₙ+3 for n≥0. Find u₁,u₂,u₃,u₄ and a simple explicit rule.
- v₀=3, vₙ₊₁=2vₙ. Calculate v₁,v₂,v₃. Explain why v₃ is not 3+3(2).
- A balance starts at 20 units and increases by 5 units each step. Write its initial condition and one-step recurrence using Aₙ. Find A₄.
- Two sequences share the rule xₙ₊₁=xₙ+4. One starts at x₀=1, the other at x₀=9. Find each x₂. What does this show?
- For f(0)=5 and f(n)=f(n−1)+2 for n≥1, trace f(3) in both directions: calls toward the stopping case, then numerical results back.
- A learner claims Bₙ=12+2n matches B₀=12, Bₙ₊₁=Bₙ+2 because it produces the same value for n=3. Give a stronger two-part check.
- A help desk really handles four requests rather than three on the second update only. It starts at 12; five arrive each update, and three are handled on all other updates. Find the actual backlog after three updates and compare it with the constant-change model's prediction. State the assumption that failed.
13 · Common Mistakes
| Tempting move | Repair |
|---|---|
| Use an update rule without a starting value. | Specify B₀ (or another starting index); different starts give different sequences. |
| Call B₃ “the backlog on Day 3” without defining the index. | Here B₃ means after three completed updates. |
| Multiply when the recurrence adds, or add when it multiplies. | Read the operation before calculating every next term. |
| Count the initial term as the first update. | n=0 is the starting snapshot; n=1 is after one update. |
| Write a recursive definition without a stopping case. | State f(0), then calculate f(n) from f(n−1). |
| Treat a modelled future value as an observed fact. | Name the assumption that the same update applies at each step. |
14 · Summary
- An initial condition gives the first value; a recurrence tells how to obtain the next value from an earlier one.
- Repeated substitution builds a term table one update at a time.
- A simple explicit rule can calculate directly from the index; check its initial value and update when comparing it with a recurrence.
- A recursive function includes a starting case and an earlier call. Iteration repeatedly updates a current value.
- A prediction from a growth model depends on its stated assumptions.
15 · Visual Concept Map
16 · Looking Ahead
Week 11 asks how many choices or arrangements are possible. We will decide when to add cases, when to multiply stages, and why the order of selected objects can matter. The careful treatment of steps and assumptions from this week remains useful.
Selected Solutions
Pass the Value
Backlog: 12,14,16,18,20; balance: 20,25,30,35,40; doubling: 2,4,8,16,32, all indexed n=0,…,4. The index increases by one per update. Without the initial value, the update alone does not select a unique sequence. In the discussion, W₃=16 because three doublings take 2 to 4 to 8 to 16.
1 · Additive recurrence
u₁=10,u₂=13,u₃=16,u₄=19; after n updates, uₙ=7+3n.
2 · Doubling recurrence
v₁=6,v₂=12,v₃=24. Each update multiplies the preceding term by 2; adding 2 three times uses a different rule.
3 · Balance
A₀=20, Aₙ₊₁=Aₙ+5 for n≥0; values 20,25,30,35,40, so A₄=40.
4 · Why the start matters
Starting at 1 gives 1,5,9, so x₂=9. Starting at 9 gives 9,13,17, so x₂=17. Same update, different initial conditions.
5 · Recursive trace
Calls: f(3)→f(2)→f(1)→f(0). Results: f(0)=5, f(1)=7, f(2)=9, f(3)=11.
6 · Compare descriptions
Check B₀=12+2(0)=12. Then (12+2(n+1))−(12+2n)=2 for each n≥0, matching the update.
7 · Changed second update
Actual backlog: 12→14 after the first update, 14+5−4=15 after the second, and 15+5−3=17 after the third. Constant-change model predicts B₃=18. The assumption of three handled requests at every step failed.
Exit check
c₀=4, cₙ₊₁=cₙ−1 for n≥0; c₂=2. Iteration updates a current value forward; a recursive call requests a previous result until a starting case is reached.