CSC165 Discrete Structure

Discrete StructureTU Board 2081

Solve the recurrence relation a n = a n−1 + 2a n−2 with initial conditions a 0​ = 2 and a 1​ = 7.

5

Answer

Recurrence: aₙ = aₙ₋₁ + 2aₙ₋₂, with a₀ = 2 and a₁ = 7.

This is a linear homogeneous recurrence of degree 2 with constant coefficients.

Step 1: characteristic equation

Put aₙ = rⁿ: r² = r + 2, so r² − r − 2 = 0, which factors as (r − 2)(r + 1) = 0.

The roots are r = 2 and r = −1 (distinct).

Step 2: general solution

aₙ = α·2ⁿ + β·(−1)ⁿ

Step 3: use the initial conditions

  • n = 0: α + β = 2
  • n = 1: 2α − β = 7

Adding the two equations: 3α = 9, so α = 3, and then β = −1.

Solution

aₙ = 3·2ⁿ − (−1)ⁿ

Check: from the recurrence, a₂ = a₁ + 2a₀ = 7 + 4 = 11. From the formula, a₂ = 3·4 − 1 = 11. ✓

Discussion

Loading…

More Discrete Structure questions

All Discrete Structure old questions