How cost grows
1.[2p] What exactly does assert?
What exactly does assert?
Correct
The answer is: There exist $c > 0$ and $n_0$ with $f(n) \le c\,g(n)$ for every $n \ge n_0$
The answer is: There exist $c > 0$ and $n_0$ with $f(n) \le c\,g(n)$ for every $n \ge n_0$
The answer is: There exist $c > 0$ and $n_0$ with $f(n) \le c\,g(n)$ for every $n \ge n_0$
2.[2p] Using the bound and , the proof that gives a witness constant . What is ?
Using the bound and , the proof that gives a witness constant . What is ?
CorrectNot quite: 4.5
3.[2p] The statement "quicksort is at least " is a well-formed claim.
The statement "quicksort is at least " is a well-formed claim.
The answer is: False
Correct
4.[3p] Which of these are true of ?
Which of these are true of ?
Select all that apply
Correct
Correct
Correct
The answer is: $f(n) = O(n^2)$, $f(n) = \Theta(n^2)$, $f(n) = O(n^3)$
5.[2p] A cubic algorithm takes 1.0 second on . How many seconds does it take on ?
A cubic algorithm takes 1.0 second on . How many seconds does it take on ?
CorrectNot quite: 125
6.[2p] A loop runs times, and its body halves a counter starting at until the counter reaches 1. The total cost is
A loop runs times, and its body halves a counter starting at until the counter reaches 1. The total cost is
Correct
The answer is: $\Theta(n \log n)$
The answer is: $\Theta(n \log n)$
The answer is: $\Theta(n \log n)$
7.[2p] Why does need no logarithm base?
Why does need no logarithm base?
Correct
The answer is: Changing base multiplies by a constant, and constants are discarded
The answer is: Changing base multiplies by a constant, and constants are discarded
The answer is: Changing base multiplies by a constant, and constants are discarded
8.[3p] Put these costs in order from slowest-growing to fastest-growing.
Put these costs in order from slowest-growing to fastest-growing.
Show the answer
b, e, d, a, c
9.[2p] A "galactic algorithm" such as the current record for matrix multiplication is one that
A "galactic algorithm" such as the current record for matrix multiplication is one that
Correct
The answer is: has a better exponent but constants so large it never wins at any feasible input size
The answer is: has a better exponent but constants so large it never wins at any feasible input size
The answer is: has a better exponent but constants so large it never wins at any feasible input size