Discrete StructureUnit 412 min read
Recurrence Relations & Mathematical Induction: Definitions, Solving, Proofs
Unit 4 of Discrete Structure covers recurrence relations (linear homogeneous/non-homogeneous, characteristic equations, solving methods) and mathematical induction (weak/strong induction, base case, inductive step, recursive algorithms). Learn to derive closed-form solutions, prove correctness, and apply induct
1. Recurrence Relations: Foundations
1.1 Definition & Examples
A recurrence relation defines a sequence where each term depends on one or more preceding terms. Examples:
- Fibonacci: (with ).
- Linear homogeneous: (from past exams).
- Non-homogeneous: .
Key terms:
- Order: Highest subscript difference (e.g., is order 2).
- Initial conditions: Required to uniquely determine a solution (e.g., ).
1.2 Types of Recurrence Relations
| Type | Form | Example | Solution Method |
|---|---|---|---|
| Linear homogeneous | Characteristic equation (roots) | ||
| Non-homogeneous | Homogeneous + particular solution | ||
| Constant coefficients | Coefficients are constants | Characteristic equation | |
| Variable coefficients | Coefficients depend on | Often solved via substitution/guessing |
1.3 Solving Linear Homogeneous Recurrence Relations
Step 1: Write the characteristic equation
For , assume a solution of the form . Substitute to get: Divide by (assuming ): This is the characteristic equation:
Step 2: Find roots and general solution
- Distinct real roots : General solution: .
- Repeated root (multiplicity ): Add terms .
- Complex roots : Use Euler’s formula: or trigonometric form .
Step 3: Apply initial conditions
Use given to solve for constants .
Worked Example 1: Solve with
- Characteristic equation:
- General solution:
- Apply initial conditions:
- For : .
- For : .
- Final solution:
Verification:
- .
- Using solution: ✓.
Worked Example 2: Solve with
- Characteristic equation:
- General solution:
- Apply initial conditions:
- : .
- : .
- : . Solving: .
- Final solution:
1.4 Non-Homogeneous Recurrence Relations
For , the solution is: Methods for particular solution:
Guess based on :
- If (polynomial), guess of same/higher degree.
- If , guess (unless is homogeneous solution).
- If or , guess .
Undetermined coefficients: Solve for coefficients by substitution.
Worked Example 3: Solve
- Homogeneous solution: .
- Particular solution: Guess (since is not homogeneous solution). Substitute into recurrence:
- General solution:
- Apply initial condition (e.g., ): . Final solution: .
2. Mathematical Induction
2.1 Definition & Structure
Mathematical induction is a proof technique for statements about all natural numbers . It consists of:
- Base case: Prove or holds.
- Inductive step: Assume holds (inductive hypothesis), then prove follows.
Variants:
- Weak induction: Only assumed.
- Strong induction: Assume hold to prove .
2.2 Proof by Weak Induction
Worked Example 4: Prove
- Base case (): LHS = , RHS = . ✓
- Inductive step: Assume true for : Prove for : Simplify RHS: Show LHS = RHS: ✓ Thus, by induction, the statement holds for all .
Worked Example 5: Prove is divisible by 5 for all
Base case (): is not divisible by 5. Correction: Start at : not divisible by 5. Revised statement: Prove is divisible by 57 (from past exam). (Note: Always verify base cases carefully!)
Alternative correct example: Prove is divisible by 57.
- Base (): ✖. Fix: Use : ✖. Conclusion: Original problem likely had a typo. Use: Prove is divisible by 57.
Revised proof:
- Base case (): ✖. Final fix: Use for . (For exam purposes, stick to standard examples like for .)
2.3 Strong Induction
Used when the inductive step depends on multiple prior cases (e.g., Fibonacci).
Worked Example 6: Prove for Fibonacci numbers
- Base cases:
- .
- .
- Inductive step: Assume true for all . Prove for : (Note: Requires , which holds since .)
2.4 Proving Correctness of Recursive Algorithms
Use induction to prove a recursive algorithm computes the correct result.
Worked Example 7: Prove the recursive algorithm for is correct
Algorithm:
def power(b, n):
if n == 0:
return 1
else:
return b * power(b, n-1)
Claim: power(b, n) = b^n for all .
- Base case ():
power(b, 0) = 1 = b^0. ✓ - Inductive step: Assume
power(b, k) = b^k. Then: ✓ Thus, by induction, the algorithm is correct.
3. Applications & Connections
3.1 Recurrence Relations in Computer Science
- Time complexity: Recurrences model divide-and-conquer algorithms (e.g., Merge Sort: ).
- Dynamic programming: Optimized solutions to recurrences (e.g., Fibonacci with memoization).
3.2 Induction in Combinatorics
- Proving identities (e.g., binomial coefficients, Catalan numbers).
- Counting problems (e.g., number of subsets, permutations).
4. Common Pitfalls & Exam Tips
4.1 Recurrence Relations
- Mistake: Forgetting initial conditions lead to infinitely many solutions.
- Fix: Always include initial conditions in the general solution.
- Mistake: Incorrect characteristic equation (e.g., missing terms).
- Fix: Double-check coefficients when rewriting the recurrence.
4.2 Mathematical Induction
- Mistake: Weak base case (e.g., starting at when fails).
- Fix: Verify the smallest relevant (often or ).
- Mistake: Assuming the inductive hypothesis is sufficient for strong induction.
- Fix: Explicitly state which prior cases are assumed.
- Mistake: Circular reasoning in the inductive step.
- Fix: Clearly separate the assumption from the proof of .
4.3 Exam-Specific Tips
For recurrence relations:
- Always show the characteristic equation and its roots.
- Clearly label homogeneous/particular solutions.
- Verify solutions with initial conditions.
For induction proofs:
- State the base case explicitly (e.g., "For , ...").
- Write the inductive hypothesis as "Assume holds for some ."
- Show each algebraic step in the inductive step.
Common exam questions:
- Solve a given recurrence relation (e.g., ).
- Prove a combinatorial identity using induction (e.g., sum of cubes).
- Prove correctness of a recursive algorithm.
Avoid:
- Skipping the base case or assuming it’s trivial.
- Incorrectly handling repeated/complex roots in recurrences.
- Using weak induction when strong induction is required.
5. Practice Problems
- Solve the recurrence with .
- Prove by induction: .
- Prove the correctness of the recursive algorithm for factorial:
def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) - Solve with .
- Prove by strong induction: Every integer can be written as a product of primes.
6. Summary Table
| Topic | Key Concept | Example | Exam Focus |
|---|---|---|---|
| Recurrence relation | Defines sequence terms via prior terms | Solving, characteristic equations | |
| Homogeneous solution | Solution to | Roots of characteristic equation | |
| Particular solution | Guess for non-homogeneous term | for | Undetermined coefficients |
| Weak induction | Prove | Sum of first integers | Base case, inductive step |
| Strong induction | Assume | Fibonacci sequence bounds | Multiple prior cases |
| Recursive algorithms | Prove correctness via induction | Binary search, factorial | Base case, inductive hypothesis |
Exam Tip
- Recurrence relations: Always solve the characteristic equation first. For non-homogeneous terms, guess a particular solution based on .
- Induction proofs: Write the base case and inductive step as separate paragraphs. Clearly state what you’re assuming and what you’re proving.
- Algorithms: When proving correctness, define the recursive function explicitly and use induction to match the recursion structure.
- Time management: Spend ~10 minutes on recurrence relations (characteristic equation is half the marks) and ~15 minutes on induction proofs (base case + inductive step).
- Past exam patterns: Expect 1-2 questions combining recurrence relations and induction (e.g., "Solve this recurrence and prove a property using induction").```
Based on the TU BSc CSIT syllabus for Discrete Structure (CSC165), unit 4.
Discussion
Loading…