We consider the following four types of equations:

- T(n) = T(n – 1) + f(n), T(1) = f(1)
- T(n) = a * T(n – 1) + f(n), T(1) = f(1)
- T(n) = T(n / b) + f(n), T(1) = f(1)
- T(n) = a * T(n / b) + f(n), T(1) = f(1)

**The first type of equation is solved using telescoping
technique:**

T(n) = T(n – 1) + f(n)

T(n–1) = T(n – 2) + f(n – 1)

T(n-2) = T(n – 3) + f(n – 2)

…

T(2) = T(1) + f(2)

Summing up all the equations and noticing that we will get terms T(n – 1), T(n – 2), …, T(2) on both sides and therefore they can be cancelled, we obtain:

T(n) = f(n) + f(n – 1) + f(n – 2) + … + f(2) + T(1) = Sf(i), i runs from 1 to n

The second type of equation is reduced to the first type using range transformation technique:

T(n) = a * T(n – 1) + f(n), T(1) = f(1)

Multiplying both sides of equation by a-n, we get:

a^{-n} * T(n) = a * a^{-n} * T(n – 1) + a^{-n}
* f(n)

a^{-n} * T(n) = a^{-(n-1)} * T(n – 1) + a^{-n}
* f(n)

Let us denote R(n) = a^{-n} * T(n), then a^{-(n-1)}
* T(n – 1) = R(n – 1)

R(n) = R(n – 1) + a^{-n} * f(n), R(1) = a^{-1}
* T(1) = T(1) / a = f(1) / a

Now we can solve for R(n) using telescoping technique and
then we would get the answer for T(n) using the formula T(n) = a^{n} *
R(n)

The third type of equation is reduced to the first type using domain transformation technique:

T(n) = T(n / b) + f(n), T(1) = f(1)

To be able to continuously divide by b, we assume that n is
a perfect power of b, i.e. n = b^{k}

n / b = b^{k} / b = b^{k-1}

T(b^{k}) = T(b^{k-1}) + f(b^{k}),
T(b^{0}) = f(1)

Let us denote R(k) = T(b^{k}), then we get:

R(k) = R(k – 1) + g(k), R(0) = f(1), where g(k) = f(b^{k})

Now we can solve for R(k) using telescoping technique and
then we would get the answer for T(n) by using log_{b}n instead of k.

The fourth type of equation is solved by applying combination of domain and range transformations. It is imperative that at first domain transformation is made and only then the range one.