Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 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)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

1. Define and explain culture and its impact on your communication

Answered: 1 week ago