CX2101 Algorithm Design and Analysis
Tutorial 3: Analysis Techniques
School of Computer Science and Engineering Nanyang Technological University
1. Solve the following recurrences by the iteration method
1) T(1) = 1, and for n 2, T(n) = 3T(n-1) + 2
2) T(1) = 1, and for n 2, a power of 2, T(n) = 2T(n/2) + 6n
2. Solve the recurrences in Question 1 by the substitution method.
3. Solve the following recurrences by the master method.
1) W(n) = W(n/3) + 5
2) T(n) = 2T(n/2) + n/4
3) W(n) = 2W(n/4) + √n3
4. Determine which of the following are linear homogeneous recurrence relations with
constant coefficients. Also find the degree of those that are.
1) an = 4an-2 + 5an-3
2) an = 2nan-1 + an-2
3) an = an-1 + an-4
4) an = a2n-1 + an-2
5) an = an-2 + n
5. Solve the following recurrence relations together with the initial conditions given.
(Due to time constraints, we may not cover every part in the tutorial class.)
1) an = 7an-1 - 10an-2 for n ≥ 2, a0 = 1, a1 = 0
2) an = 4an-2 for n ≥ 2, a0 = 6, a1 = 8
3) an = 2an-I - an-2 for all n 2, a0 = 1, a1 = 3