CSC 415 Foundations of Computer Science I
Homework #7
Due: Mar 5 (1 week)
Do all questions in problem 1 through 3.
- Johnsonbaugh, Section 5.2 (p. 244)
12, 13, 14
- Use iteration to find an explicit formula for each of the following
sequences.
- T(n) = T(n-1) + n + 1, for all n >= 2, and T(1) = 0
- T(n) = 2*T(n/2) + n, for all n >= 2, and T(1) = 1
- For the explicit formula you derived in problem 2a. above,
- Plug in n = 1, 2 and 3 in both recursive and explicit formulas, and
show they yield the same results.
- Use induction to show that it is correct.
- Find the big-oh complexity. Give c and n0.