Chapter 1, #14a & b (3 points)
k k k
Sum (i * 2^i) = Sum( Sum(2^j) )
i=0 i=1 j=i
k
= Sum(2^(k+1) - 2^i)
i=1
k
= k*2^(k+1) - Sum(2^i)
i=1
= k*2^(k+1) - (2^(k+1) - 2)
= (k-1)k*2^(k+1) + 2
14b.
k k k
Sum (i * 2^-i) = Sum( Sum(2^-j) )
i=0 i=1 j=i
k
= Sum(2^-i - 2-(k+1)) / (1 - 2^-1)
i=1
k
= -k*2^(-k) + Sum(2^(-i+1))
i=1
= -k*2^-k + 2 - 2^(-k+1)
= 2 - (k+2)*2^-k
Chapter 1, #16 (3 points)
log_e n = log_2 n * log_e 2, so just multiply the binary log
by ln 2 = 0.693147
Chapter 1, #17 (3 points)
17a. Their product is 1 because ....
b^(log_b a log_a b) = (b^(log_b a))^log_a b
= a ^(log_a b)
= b
17b. log_a x = log_b x * log_a b < log_b x , since log_a b < 1 if a > b
17c. Since n &ge 1 and the logarithmic functions are monotone increasing,
log_b(n+c) &le log_b(nc) = log_b n + log_b c
so the stated inequality holds with d = log_b c.
Chapter 1, #22 (3 points)
22a. False, by part(1) of the Growth Rates Theorem, with &alpha = 2.5 and &beta = 2.
22b. True, since lg(n^3) &isin &Omicron(log n) &sube &Omicron(n log n)
22c. True by the Growth Rates and Big-O Theorems, since &radic(n) &isin &Omicron(&radic(n)),
lg &radic(n) = 1/2 lg n &isin &Omicron(n ^ (1/2)) = &Omicron(&radic(n)), and hence by multiplying
the left and right sides &radic(n) lg &radic(n) &isin &Omicron(&radic(n) &radic(n)) = &Omicron(n).
Chapter 1, #23 (3 points)
23a. True. For any n &ge 1, 2/n + 4/n^2 &le 2/n + 4/n = 6/n &isin &Omicron(1/n).
23b. True, since logarithms to different bases differ only by a constant factor.
23c. True, since logarithms of different powers of n differ only by a constant factor.
23d. False, since log n ¬in &radic(log_2 n). (If it were true that log n &isin &radic(log_2 n),
then log n / &radic(log_2 n) would be bounded by some constant c , but taking the base
of log n to be 2 this ratio is the monotone increasing function &radic(log_2 n). )
23e. True, since for n > 26 we have min(700, n^2) < 700 &isin &Omicron(1).
Chapter 1, #36 (6 points)
Using the Divide and Conquer Recurrence Theorem in the text ...
a. a = 3, b = 2, and e=1, so T(n) &isin &Omicron(n^log_2 3).
b. a = 3, b = 2, and e=2, so T(n) &isin &Omicron(n^2).
c. a = 8, b = 2, and e=3, so T(n) &isin &Omicron(n^3 log n).
d. a = 4, b = 3, and e=1, so T(n) &isin &Omicron(n^ log_3 4).
e. a = 4, b = 3, and e=2, so T(n) &isin &Omicron(n^2).
f. a = 9, b = 3, and e=2, so T(n) &isin &Omicron(n^2 log n).
Using our version of the "Master Method":
a. a = 3, b = 2, and p=1, k=0, so Case I, and
T(n) &isin &Omicron(n^log_2 3).
b. a = 3, b = 2, and p=2, k=0, so Case III, and
T(n) &isin &Omicron(n^2).
c. a = 8, b = 2, and p=3, k=0, so Case II, and
T(n) &isin &Omicron(n^3 log n).
d. a = 4, b = 3, and p=1, k=0, so Case I, and
T(n) &isin &Omicron(n^ log_3 4).
e. a = 4, b = 3, and p=2, k=0, so Case III, and
T(n) &isin &Omicron(n^2).
f. a = 9, b = 3, and p=2, k=0, so Case II, and
T(n) &isin &Omicron(n^2 log n).
Chapter 1, #47 (3 points)
36 possibilities (6 x 6)
1, 1 1, 2 1, 3 1, 4 1, 5 1, 6
2, 1 2, 2 2, 3 2, 4 2, 5 2, 6
3, 1 3, 2 3, 3 3, 4 3, 5 3, 6
4, 1 4, 2 4, 3 4, 4 4, 5 4, 6
5, 1 5, 2 5, 3 5, 4 5, 5 5, 6
6, 1 6, 2 6, 3 6, 4 6, 5 6, 6
Sums of those 36 possibilities:
2 3 4 5 6 7
3 4 5 6 7 8
4 5 6 7 8 9
5 6 7 8 9 10
6 7 8 9 10 11
7 8 9 10 11 12
sum count prob
2 1 1/36
3 2 2/36
4 3 3/36
5 4 4/36
6 5 5/36
7 6 6/36
8 5 5/36
9 4 4/36
10 3 3/36
11 2 2/36
12 1 1/36
a. a = 8, b = 2, p = 3, k=1, so case II, and
T(n) = &Theta(n^3 log^2 n)
b. a = 3, b = 2, p = 1, k=0, so case I, and
T(n) = &Theta(n^log_2 3)
c. a = 3, b = 2, p = 2, k=0, so case III, and
T(n) = &Theta(n^2)
d. a = 16, b = 2, p = 3, k=1, so case I, and
T(n) = &Theta(n^4)
e. a = 1, b = 10/9, p = 1, k=0, so case III, and
T(n) = &Theta(n)