CSC 415 Foundations of Computer Science I
Homework #7
Due: Mar 5 (1 week)

Do all questions in problem 1 through 3

  1. Johnsonbaugh, Section 5.2 (p. 244)

    12, 13, 14

     

  2. Use iteration to find an explicit formula for each of the following sequences.

    1. T(n) = T(n-1) + n + 1, for all n >= 2, and T(1) = 0
    2. T(n) = 2*T(n/2) + n, for all n >= 2, and T(1) = 1

 

  1. For the explicit formula you derived in problem 2a. above,
    1. Plug in n = 1, 2 and 3 in both recursive and explicit formulas, and show they yield the same results.
    2. Use induction to show that it is correct.
    3. Find the big-oh complexity.  Give c and n0.