Homework 7 (assigned August 2, due August 9)
(a) T(2) (2 points)
(b) T(8) (2 points)
(c) T(64) (3 points)
(a) T(n) = T(n - 1) + 3, with T(1) = 2.
(b) T(n) = 3T(n/2) + 1, with
T(1) = 1. Use the fact that
alogbn
= nlogba and state your answer as
a function of n.
(You may assume that n is a power of 2, i.e.,
n = 2k for some
k.)
(c) T(n) = T(n/3) + 1, with
T(1) = 1.
(You may assume that n is a power of 3, i.e.,
n = 3k for some k.)
(a) Set up a recurrence for the amount in the account at the end of n years. (3 points)
(b) Find an explicit formula for the amount in the account at the end of n years. Your answer should be a function of n. (3 points)
(c) How much money will the account contain after 10 years? (2 points)
Gerry Brady
Tuesday August 2 23:39:38 CDT 2005