Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Order following functions based on their growth rate from slow to the fastest loglogn, sqrt(n), (n+34)!, 2 log(n) , 2 n , 2 1000

1. Order following functions based on their growth rate from slow to the fastest

loglogn, sqrt(n), (n+34)!, 2log(n), 2n, 21000, log(n!), n3, nlogn, lognlogn, sqrt(logn)

2. Calculate the big O notations for following loops

for i =1 to n

for j = 1 to n2

{.}

for i =1 to n2

for j = 1 to i

{.}

for i =1 to n

for j = 1 to 100

{.}

for i =1 to n3

for j = 1 to n2

for k = 1 to n2

{.}

3. We have two algorithms solving the same problem. Algorithm As running time function is n2+3n+12, and algorithm Bs running time is 1000n+200000. Asymptotically, which algorithm is better? Is the asymptotically worse one totally useless? If not, when is it useful?

4. Given the following operation numbers, determine the closest big Oh notation for each of them

A.

B.

C.

D.

E.

F. , where a, b, c, d and k are constants

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_2

Step: 3

blur-text-image_3

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

Students also viewed these Databases questions