Divide and conquer
1.[2p] Why does the recursion tree for give ?
Why does the recursion tree for give ?
2.[2p] Put the three steps of divide and conquer in order.
Put the three steps of divide and conquer in order.
Conquer each instance by solving it recursively down to a base case
Combine the sub-answers into an answer for the whole
Divide the problem into smaller instances of the same problem
Show the answer
b, c, a
3.[2p] How many comparisons does mergesort make in the worst case on 16 elements? Use .
How many comparisons does mergesort make in the worst case on 16 elements? Use .
4.[2p] For , the master theorem compares against
For , the master theorem compares against
5.[2p] Naive block matrix multiplication obeys . What exponent does the master theorem give for ?
Naive block matrix multiplication obeys . What exponent does the master theorem give for ?
6.[3p] In Karatsuba's method for with , , , , the middle term is . What is it?
In Karatsuba's method for with , , , , the middle term is . What is it?
7.[3p] Karatsuba multiplication costs rather than because
Karatsuba multiplication costs rather than because
8.[3p] Which are true of mergesort?
Which are true of mergesort?
Select all that apply
9.[2p] Merging two sorted runs of four elements each takes at most how many comparisons?
Merging two sorted runs of four elements each takes at most how many comparisons?
10.[2p] The master theorem settles every recurrence of the form .
The master theorem settles every recurrence of the form .