Here are some common orders of growth, ranked from no growth to
fastest growth:
- Θ(1) — constant time takes the same amount of time regardless
of input size
- Θ(log n) — logarithmic time
- Θ(n) — linear time
- Θ(n log n) — linearithmic time
- Θ(n2 ) — quadratic time
- Θ(n3 ), etc. — polynomial time
- Θ(2n), Θ(3n), etc. — exponential time
(considered “intractable”; these are really, really horrible)
In addition, some programs will never terminate if they get
stuck in an infinite loop.
Questions
This part asks you to state whether each of the following
equalities are True or False.
Please answer this in the function runtime_answers() which will
return a 10 element boolean list of your answers
IN ORDER.
Eg: [True, False, True, False, True, False, True, False, True,
False]
Question 2.1 n + n = Θ(n log n) Question 2.2 Question 2.3 Question 2.4 n +log n2 (5n) Question 2.5 n + log n-6(n log n) Question 2.6 n+nlog n3 + n log nn-θ(nlog n)
Question 2.7 Question 2.8 Question 2.9 Question 2.10 n3 n log nn2-e (n log n)
Here are some common orders of growth, ranked from no growth to fastest growth: Θ(1) — constant time takes the same amount of time regardless of input size Θ(log n) — logarithmic time Θ(n) — linear t...
Question 2.1 n + n = Θ(n log n) Question 2.2 Question 2.3 Question 2.4 n +log n2 (5n) Question 2.5 n + log n-6(n log n) Question 2.6 n+nlog n3 + n log nn-θ(nlog n)