Question
(30 pts) Answer each of the following questions AND justify your answer. (You can either use the definition of O , , or the limit
(30 pts) Answer each of the following questions AND justify your answer. (You can either use the definition of O, , or the limit approach discussed in class for your justification; if you believe a statement is not true, you may give a counter example).
(a) Is 2n log n = O(n)?
(b) Is 2n log n = (n)?
(c) Is 5n3 + n2 + 4 = (n3)?
(d) Is 5 log2n = (n)? (log base 2)
(e) If f (n) = (g(n)), then does it follow that f (n) + g(n) = O(g(n))?
(f) If f (n) = O(g(n)) then does it follow that g(n) = (f (n))?
(g) Find two functions f (n) and g(n) such that neither f (n) = O(g(n)) nor g(n) = O(f (n)). When you find the functions, justify that in fact they the condition stated.
I'm entirely new to Data Structures and Algorithms, so I could sure use some help on approaching these problems, and even a step-by-step solution.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started