Fundamental algorithm

 

 

1. Consider the following pairs of functions. For each pair, state whether (i) f = Θ(g), (ii) f = O(g) but f ̸= Θ(g), (iii) g = O(f) but g ̸= Θ(f), or (iv) none of these.

a. f(n)=n,g(n)=2logn.
b. f(n)=n,g(n)=22logn.
c. f(n) = n2, g(n) = 1010n.
d. f(n)=2n,g(n)=2nlogn.
e. f(n) = nlog n, g(n) = (log n)n.
f. f(n) = n3 + 8n2 + 87, g(n) = n3/1000.
g. f(n) = 4n, g(n) = 3n.
h. f(n) = logn, g(n) = loglogn.
i. f(n)=nwhennisodd,f(n)=n2 whenniseven;g(n)=nwhenniseven,g(n)=n2

when n is odd.
j. f(n)=nwhennisodd,f(n)=n2 whenniseven;g(n)=n2.

 

 

 

The post Fundamental algorithm first appeared on COMPLIANT PAPERS.

CLAIM YOUR 30% OFF TODAY

X
Don`t copy text!
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
???? Hi, how can I help?