8.2 Linear Recurrence Relations: Characteristic Roots & Particular Solutions
π‘ Core Intuition: The 3-Second Mental Modelβ
π³ The Everyday Analogy: Compounding Bank Interest & The Fibonacci Rabbit Pairβ
Think of recurrence relations as dynamic feedback loops over discrete time steps:
- The Recursive Definition: You deposit $1,000 in a bank account that pays 5% annual compound interest. Your balance at year depends on your balance at year : To find your balance at year 50 without calculating all 50 intermediate years step-by-step, you need a closed-form formula: .
- The Characteristic Root Magic: For linear homogeneous equations like , we hypothesize that the solution grows exponentially like an interest rate (). Substituting collapses the recurrence into a simple algebraic polynomial (). Factoring this polynomial unlocks the exact growth trajectory of the discrete system!
- Homogeneous vs Non-Homogeneous:
- Homogeneous (): The system runs purely on internal momentum ().
- Non-Homogeneous (): External energy or inputs are applied at every step (, such as depositing an extra $100 every year). The total solution is the sum of internal momentum () plus the steady-state response to the external drive ().
π» Bridging to Computer Science: Dynamic Programming, Divide-and-Conquer & State Invariantsβ
In computer science:
- Algorithm Complexity Analysis: Analyzing recursive algorithms (Merge Sort, Binary Search, Tower of Hanoi) produces recurrences solved via characteristic roots, iteration trees, or the Master Theorem.
- Dynamic Programming (DP): Finding the -th Fibonacci number in time using fast matrix exponentiation:
- Combinatorial Bit-String Constraints: Counting valid binary strings with no consecutive 1s or strings avoiding forbidden sub-patterns naturally models as a 2nd-order linear recurrence.
- Queueing Theory & Markov Chains: Steady-state probability distributions across server request queues satisfy linear recurrence systems.
π Linear Homogeneous Recurrence Relations (LHRR-CC)β
A Linear Homogeneous Recurrence Relation of Degree with Constant Coefficients (LHRR-CC) has the standard form:
where:
- are real numbers with .
- The relation is linear because each term appears strictly to the first power (no non-linear terms like or ).
- The relation is homogeneous because there is no isolated function of (no independent term).
- The degree (or order) is (the difference between the highest index and the lowest index ).
Initial Conditions: A recurrence of degree strictly requires initial values () to uniquely determine the sequence.
β‘ The Characteristic Equation & Root Multiplicity Casesβ
To solve , we test the exponential ansatz:
Substituting yields:
Dividing across by produces the Characteristic Equation:
The 3 Characteristic Root Solution Regimes
Formulating the general homogeneous solution based on the algebraic roots of the characteristic polynomial
Distinct Real Roots
k distinct real roots rβ, rβ, ..., rβ. General solution: aβ = Ξ±β rββΏ + Ξ±β rββΏ + ... + Ξ±β rββΏ.
Repeated Real Roots
Root r has multiplicity m. General solution introduces polynomial factors: (Ξ±β + Ξ±β n + ... + Ξ±βββ nα΅β»ΒΉ) rβΏ.
Complex Conjugate Roots
Roots r = Ο e^(Β±iΞΈ). Express via Euler's identity: ΟβΏ (Ξ±β cos(nΞΈ) + Ξ±β sin(nΞΈ)).
Let the characteristic equation have distinct roots with multiplicities respectively (such that ). The general solution to the homogeneous recurrence relation is:
where the unknown constants are uniquely solved by substituting the initial boundary conditions.
π Linear Non-Homogeneous Recurrence Relationsβ
When an external driving term is present:
The total general solution is the linear superposition of two independent components:
- (Homogeneous Solution): The general solution to the associated homogeneous recurrence (). Contains arbitrary constants .
- (Particular Solution): A specific sequence satisfying the non-homogeneous equation with no arbitrary constants.
The Method of Undetermined Coefficients
Standard trial templates for the particular solution aββ½α΅βΎ
Exponential: F(n) = c Β· sβΏ
Geometric Drive- If s is NOT a characteristic root: Trial aββ½α΅βΎ = A Β· sβΏ.
- If s IS a root with multiplicity m: Trial aββ½α΅βΎ = A Β· nα΅ Β· sβΏ.
- Crucial: The factor nα΅ breaks linear dependence (resonance).
Polynomial: F(n) = Pβ(n)
Degree t Drive- If 1 is NOT a characteristic root: Trial aββ½α΅βΎ = Aβ nα΅ + ... + Aβ n + Aβ.
- If 1 IS a root with multiplicity m: Trial aββ½α΅βΎ = nα΅ (Aβ nα΅ + ... + Aβ).
- Example: For F(n) = n, trial is Aβn + Aβ (or n(Aβn + Aβ) if r=1 is root).
Compound: F(n) = Pβ(n) Β· sβΏ
General Form- Combines both polynomial and geometric driving terms.
- Trial form: aββ½α΅βΎ = nα΅ (Aβ nα΅ + ... + Aβ n + Aβ) Β· sβΏ.
- Substitute into full recurrence and equate coefficients.
Crucial Rule of Initial Conditions
Order of Operations- NEVER evaluate constants Ξ±α΅’ on aββ½Κ°βΎ alone!
- Always combine aβ = aββ½Κ°βΎ + aββ½α΅βΎ FIRST.
- Fit initial conditions (aβ, aβ, ...) exclusively to the full sum.
π Step-by-Step Worked Examplesβ
Example 1: Solving the Classic Fibonacci Recurrence (Binet's Formula)β
Problem Statement: Solve the Fibonacci recurrence relation:
with initial conditions and .
Step-by-Step Solution:
-
Step 1: Form the Characteristic Equation
- The recurrence is .
- Substitute :
-
Step 2: Solve for Characteristic Roots
- Applying the quadratic formula:
- The two distinct roots are:
-
Step 3: Write the General Solution
- By Case 1 (distinct real roots):
-
Step 4: Solve for Constants using Initial Conditions
- For :
- For :
-
Step 5: Final Closed-Form (Binet's Formula)
Key Takeaway: Even though the closed-form formula involves the irrational number , all square roots cancel out identically for every integer , always yielding an integer output!
Example 2: Solving a Non-Homogeneous Recurrence with Resonanceβ
Problem Statement: Solve the non-homogeneous recurrence relation:
with initial conditions and .
Step-by-Step Solution:
-
Step 1: Solve the Associated Homogeneous Recurrence
- Characteristic equation: .
- Root has multiplicity .
- Homogeneous solution:
-
Step 2: Determine Particular Solution (Resonance Detection)
- External driving term is (base ).
- Notice that is already a characteristic root with multiplicity !
- Therefore, multiplying by :
- Substitute into the recurrence:
- Divide through by :
- Thus:
-
Step 3: Form Total General Solution
-
Step 4: Solve for Constants using Initial Conditions
- For :
- For :
-
Step 5: Final Unique Closed Form
Example 3: Binary Strings with No Consecutive 1sβ
Problem Statement:
Find the number of binary strings of length that do not contain two consecutive 1s (11).
Step-by-Step Solution:
- Let denote the number of valid binary strings of length .
- Case Analysis on the Final Bit:
- Case A (Ends in 0): The preceding bits can be any valid binary string without
11. There are such strings. - Case B (Ends in 1): To avoid
11, the -th bit MUST be 0. The preceding bits can be any valid string. There are such strings.
- Case A (Ends in 0): The preceding bits can be any valid binary string without
- By the Rule of Sum, we obtain the recurrence:
- Base Cases:
- : Valid strings are
0and1. - : Valid strings are
00,01,10(11forbidden) .
- : Valid strings are
- Comparing to the standard Fibonacci sequence :
π― Exam & Interview Pitfall Checkβ
| Recurrence Form | Governing Characteristic / Trial Solution | Common Fatal Error |
|---|---|---|
| Setting signs incorrectly: writing | ||
| Root repeats with multiplicity | Writing (collapsing constants into one) | |
| where is root of mult. | Trying (which evaluates to 0 on LHS due to resonance) | |
| Applying Initial Conditions | Apply exclusively to | Solving using alone before adding |
| Degree of Recurrence | Requires strictly initial conditions | Attempting to solve unique closed form with fewer than values |
Question 1: If the characteristic equation has roots (multiplicity 3), why must we multiply by ascending powers of ? Key Focus Points: Because root repeats three times, the functions form a linearly independent basis for the 3-dimensional solution space of the 3rd-order recurrence:
If you omit the and factors, the terms collapse into a single term with only 1 degree of freedom, failing to satisfy 3 independent initial conditions!
Question 2: What trial particular solution should be used if and is already a simple root of the characteristic equation? Key Focus Points: Because is already a root of the homogeneous equation with multiplicity , the standard trial will produce when plugged into the left-hand side (resonance!). You must multiply by :
If had multiplicity 2, you would try .
Trap 1: Applying Initial Conditions to the Homogeneous Solution Alone Why it fails: In non-homogeneous recurrences , calculating using alone is completely incorrect! The boundary values must balance the entire expression: .
Trap 2: Forgetting the Degree Determines the Number of Initial Conditions Why it fails: A recurrence of degree strictly requires initial conditions. If fewer than conditions are given, the sequence is underdetermined and has infinitely many solutions.