Skip to content
Infinitesimal Dynamics home
Notebook: 0 XP

Discrete Mathematics / Counting and structure

Recurrence Relations

Sequences defined by their own earlier terms, from Fibonacci to the Tower of Hanoi, and how to solve them.

3 min read · 2 sections · 2 checks

Contents 3 sections
  1. §1Defining by recursion
  2. §2The characteristic equation
  3. ?Check yourself

By the end you can

  • Write recurrences for counting problems
  • Solve linear homogeneous recurrences with constant coefficients
  • Recognise exponential growth from a characteristic root

Helps to know: Proof Techniques and Induction, Counting: Permutations and Combinations

§1Defining by recursion

The Tower of Hanoi moves nn disks by moving n−1n - 1 aside, moving the largest, then moving n−1n - 1 back on top: Hn=2Hn−1+1H_n = 2H_{n-1} + 1 with H1=1H_1 = 1. Unrolling gives Hn=2n−1H_n = 2^n - 1.

Fn=Fn−1+Fn−2,F0=0,  F1=1F_n = F_{n-1} + F_{n-2}, \quad F_0 = 0,\; F_1 = 1

§2The characteristic equation

For an=c1an−1+c2an−2a_n = c_1 a_{n-1} + c_2 a_{n-2}, guess an=rna_n = r^n. Dividing out rn−2r^{n-2} gives r2=c1r+c2r^2 = c_1 r + c_2. With distinct roots r1,r2r_1, r_2, the general solution is an=Ar1n+Br2na_n = A r_1^n + B r_2^n, and the initial values fix AA and BB.

Check yourself

  1. Q1
    If an=3an−1a_n = 3a_{n-1} and a0=2a_0 = 2, then a4=a_4 =
  2. Q2
    The characteristic equation of an=5an−1−6an−2a_n = 5a_{n-1} - 6a_{n-2} has roots…