Recurrence Relation
Context: FIT1058_MOC, FIT2004_MOC · defines a sequence from earlier terms · base case(s) + general case · turned into a closed form by Mathematical Induction FIT2004 use: a recursive algorithm’s running time obeys a recurrence (e.g. , ) — solved for a Big-O class by telescoping (repeated substitution) in Solving Recurrences (Telescoping).
Quick Revision
- 🎯 Objective: each term as an expression in previous terms ➔ base case(s) + general case.
- 📦 Core Components: base case + general rule ➔ must determine every term uniquely.
- ⚡ Key Constraint: a -step rule needs base cases; closed form via explore–formulate–prove.
📝 Core
1. The Definition
- Recurrence ➔ each term from previous terms.
- Base case ➔ finitely many initial terms given explicitly.
- General case ➔ a rule for a generic term from earlier ones.
2. Base Case Is Essential
- Rule alone ➔ defines nothing.
- With base ➔ → odds; → evens (same rule, different start).
- Depth = base count ➔ -step rule needs base cases.
3. Recurrence → Closed Form
- Explore ➔ compute first terms.
- Formulate ➔ guess a pattern.
- Prove ➔ by Mathematical Induction.
📊 Exam Execution Trace
Manual Execution Trace
:
| Step / State | |||
|---|---|---|---|
| 0 (Init) | 1 | — | 1 |
| 1 | 2 | 1 | 3 |
| 2 | 3 | 3 | 7 |
| 3 | 4 | 7 | 15 |
⚠️ Common Mistakes
- 💡 -step rule needs base cases ➔ with only fixes just odd positions; add for the even ones.
🧠 Active Recall
What are the two ingredients of a recurrence, and why does need two base cases?
- Hint: Depth = base count.
Answer
- Short answer: Base case(s) + general rule, determining every term; reaches two back, so both needed.
- Why: -step ⟹ bases ➔ fewer leaves terms undefined.
Describe explore–formulate–prove and apply it to .
- Hint: Guess then induct.
Answer
- Short answer: Explore ; formulate ; prove by induction (basis + step).
- Why: Closed form ➔ converts a backward-looking rule to a formula valid for all .