11.3: Solving through Iteration
Given a recursively defined sequence \(\{a_k\}\text{,}\) we can “unravel” the recursive definition to determine an explicit formula for the general term \(a_k\) which involves only the index \(k\text{.}\)
Solve the recurrence relation from Example 11.2.1 .
Solution
The sequence in the example was defined recursively by \(h_0 = 100\) and
\begin{align*} h_k & = \dfrac{3}{4} \, h_{k-1} \text{,} & k & \ge 1 \text{.} \end{align*}
We can apply this formula to every term in the sequence, except for the first, using the pattern “each term is three-quarters of the previous term.” That is,
\begin{align*} h_k & = \dfrac{3}{4} \, h_{k-1} \text{,} & h_{k-1} & = \dfrac{3}{4} \, h_{k-2} \text{,} & h_{k-2} & = \dfrac{3}{4} \, h_{k-3} \text{,} & & \ldots\text{.} \end{align*}
Therefore, for \(k \ge 1\text{,}\) we can calculate
\begin{align*} h_k & = \dfrac{3}{4}\,h_{k-1} \\ & = \dfrac{3}{4}\left(\dfrac{3}{4}\,h_{k-2}\right) = \left(\dfrac{3}{4}\right)^2 h_{k-2}\\ & = \left(\dfrac{3}{4}\right)^2\left(\dfrac{3}{4}\,h_{k-3}\right) = \left(\dfrac{3}{4}\right)^3 h_{k-3}\\ & \vdots \\ & = \left(\dfrac{3}{4}\right)^k h_0 = \left(\dfrac{3}{4}\right)^k (100). \end{align*}
(Note that this formula is also valid for \(k=0\text{.}\))
We can verify our formula by substituting it into the original recurrence relation:
\begin{equation*} \text{RHS} = \dfrac{3}{4}\,h_{k-1} = \dfrac{3}{4}\,\left(\dfrac{3}{4}\right)^{k-1} h_0 = \left(\dfrac{3}{4}\right)^k h_0 = h_k = \text{LHS}\text{.} \end{equation*}
We could also prove our formula is correct by induction.
Solve the recurrence relation \(a_k = r a_{k-1}\) for \(k\ge 1\text{,}\) where \(r\) is a constant and the first term \(a_0\) is arbitrarily chosen.
- Compare.
-
This example generalizes the previous example.
Solution
Through iteration, we obtain
\begin{equation*} a_k = r a_{k-1} = r (r a_{k-2}) = r(r(r a_{n-3})) = \cdots = r^k a_0\text{.} \end{equation*}
Solve the recurrence relation from Example 11.2.2 .
Solution
The sequence in the example was defined recursively by \(a_0 = 1\) and
\begin{align*} a_k & = ka_{k-1} \text{,} & k & \ge 1 \text{.} \end{align*}
Therefore, for \(k \ge 1\text{,}\) we have
\begin{align*} a_k & = k a_{k-1} \\ & = k ( (k-1) a_{k-2} ) \\ & = k ( (k-1) ( (k-2) a_{k-3} )) \\ & \vdots \\ & = k(k-1)(k-2)\cdots (k - (k-1)) a_{k-k} \text{.} \end{align*}
Simplifying this last expression leads to
\begin{equation*} a_k = k(k-1)(k-2)\cdots 1 \cdot a_0 = k! \text{.} \end{equation*}
Note that the formula \(a_k = k!\) is also valid for \(k=0\) when we adopt the convention \(0! = 1\text{.}\)
Verify that the formula in the solution to the above worked example satisfies the recurrence relation.
Solve the recurrence relation \(a_0 = 1\text{,}\) \(a_1 = \dfrac{1}{2}\text{,}\) and
\begin{align*} a_k & = \dfrac{k}{2(k-1)}\, a_{k-1} \text{,} & k & \ge 2 \text{.} \end{align*}
Solution
Iterating, we obtain
\begin{align*} a_k & = \dfrac{k}{2(k-1)}\, a_{k-1} \\ & = \dfrac{k}{2(k-1)} \left( \dfrac{k-1}{2(k-2)}\, a_{k-2} \right) = \dfrac{k}{2^2(k-2)} \, a_{k-2}\\ & = \dfrac{k}{2^2(k-2)} \left( \dfrac{k-2}{2(k-3)}\, a_{k-3} \right) = \dfrac{k}{2^3(k-3)} \, a_{k-3}\\ & \vdots \\ & = \dfrac{k}{2^{k-1} (k-(k-1)}) \, a_{k-(k-1)} \text{.} \end{align*}
Simplifying this last expression, we obtain
\begin{equation*} a_k = \dfrac{k}{2^{k-1}} \, a_1 = \dfrac{k}{2^k} \text{.} \end{equation*}