CS 173 Final: Examlet B 7

49 views6 pages

Document Summary

6 (10 points) suppose we have a function f de ned by f (0) = f (1) = 3 f (n) = 5f (n 2) + d, for n 2 where d is a constant. Your partner has already gured out that f (n) = 5kf (n 2k) + k 1. Finish nding the closed form for f (n) assuming that n is even. Recall the following useful closed form (for r 6= 1): rk = X k=0 n rn+1 1 r 1. 6: (8 points) suppose we have a function f de ned by f (0) = f (1) = 3 f (n) = 5f (n 2) + d, for n 2 where d is a constant. Express f (n) in terms of f (n 6) (where n 6). 6: (8 points) suppose we have a function g de ned (for n a power of 3) by g(1) = c g(n) = 3g(n/3) + n for n 3.