You are on page 1of 2

University of Virginia cs3102: Theory of Computation 30 September 2021

Week 5: It’s Complicated — Write-up Problem


Collaboration: You should work on this problem yourself. You may not collaborate on
the assigned writeup with your cohort-mates or anyone else, but you may use notes
taken before or during your assessed cohort meeting. You may also use other published
resources you find, but if you use any materials that were not provided by the course, you
should cite them in your solution.

Write-up Problem: Asymptotic Operators

For each sub-problem, indicate if the statement is true or false and support your answer with a convincing
argument.

(a) 3012n ∈ O(n2 + n log n)


(b) nn ∈ O(n! )
(c) n + log n ∈ Θ(n)
(d) 1.9n ∈ Θ(2n )
(e) O(n2 ) ⊂ O(n3 )

(a) 3012n ∈ O(n2 + n log n) : True

3012n ≤ cn2 + cn log n


3012 ≤ cn + c log n
n=10, c=4000
True

(b) nn ∈ O(n! ) : False

nn > cn!
Case 1: c < 1
n= 1c
1
1
c > c( 1c )!
c

True for c < 1

Case 2: c ≥ 1
n= (c + 1)
(c + 1)c+1 > c(c + 1)!
True for c ≥ 1

Overall False
cs3102 Fall 2021 2 Week 5: It’s Complicated — Write-up Problem

(c) n + log n ∈ Θ(n) : True

n + log n ≥ cn
c=2, n=1
True for big omega

n + log n ≤ cn
n=1 c
1 1
c + log c ≤ 1
c=5
True for big O

True for big Theta

(d) 1.9n ∈ Θ(2n ) : False

1.9n ≥ c2n
No constant c where 2n does not eventually overtake 1.9n , not Big Omega, therefore not Big Theta

(e) O(n2 ) ⊂ O(n3 ) : True

cn2 ≤ cn3
n2 ≤ n3
n=2, True
n2 can be upper bounded by n3 as well

Creative Commons BY-NC 4.0 Nathan Brunelle

You might also like