Question: ( 2 0 points ) ( a ) For each of the following, indicate whether the statement is true or false ( no explanations necessary

(20 points)
(a) For each of the following, indicate whether the statement is true or false (no explanations necessary):
i.10n5 is O(2n).
ii.log3(n) is O(nlog(n)).
iii. 2n2+3n is O(n).
iv,22+n is O(2n)
v.22n is O(2n)
(b) Suppose a sorting algorithm takes 3 seconds to sort 10 items. How much time in seconds will the same algorithm take to sort 100 items if the number of operations the algorithm performs is exactly n2.
(c) Suppose algorithm A takes 30nlogn time and algorithm B takes 3n2 time. What is the smallest value of n(assuming n>2) for which A will be faster than B?
(d) If p(n) and q(n) are two functions such that p(n) is O(q(n)), does this always mean that for every value of n,p(n)q(n)? If you think the answer is yes, give a justification. If you think the answer is no, give a counterexample i.e. find two functions p(n) and q(n) and a number y such that p(n) is O(q(n)) and p(y)>q(y)
 (20 points) (a) For each of the following, indicate whether the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!