When studying the Gambler’s Ruin problem, we often encounter the recurrence relation
where:
is the probability that a player eventually wins the game when starting with
dollars.
is the probability of winning the next bet.
is the probability of losing the next bet.
.
A natural question is: How do we solve this recurrence?
A Common First Attempt
Many students initially try a solution of the form
because powers of are familiar from algebra and calculus.
Substituting this into the recurrence gives
Unfortunately, this expression is difficult to simplify and does not lead to an easy way of determining the value of .
The Standard Approach
For linear recurrence relations with constant coefficients, we instead assume
where is an unknown constant.
This choice is powerful because shifting the index preserves the exponential form:
and
Substituting into the recurrence relation yields
Now divide every term by
to obtain
Rearranging gives
This equation is called the characteristic equation of the recurrence.
Solving the Characteristic Equation
Factoring the quadratic,
latex(pr-q)=0[/latex]
we obtain two roots:
and
Therefore, the general solution of the recurrence is
where and
are constants determined by the boundary conditions.
Why Does r^i Work So Well?
The key idea is that exponential functions behave nicely under index shifts.
For example,
and
This allows every term in the recurrence to be expressed in terms of the same quantity, making it possible to reduce the recurrence relation to an ordinary algebraic equation.
In contrast, using
produces terms such as
latex^r[/latex]
and
latex^r[/latex]
which do not simplify neatly.
Key Takeaway
Whenever you encounter a linear recurrence relation with constant coefficients such as
try a solution of the form
rather than
because exponential trial solutions transform the recurrence into a characteristic equation that can be solved using algebra.
