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

When It Flips: the recurrence is easiest to write; the closed form reveals growth and gives any term directly. When no closed form exists (e.g. Fibonacci at first), bounds can still be proved by induction. The programming analogue is Recursion.

📊 Exam Execution Trace

Manual Execution Trace

:

Step / State
0 (Init)11
1213
2337
34715

⚠️ Common Mistakes

  • 💡 -step rule needs base cases with only fixes just odd positions; add for the even ones.

🧠 Active Recall