Question

Consider the following function, select all the function and apply which one is f= 0(g), f=...

Consider the following function, select all the function and apply which one is f= 0(g), f= omega g & f = theta g. Explain it each and every step.

f = n! g = 2^n

f=(log n)^3 g = n

f= 5^n/2 g =2^n

f=logn! g= nlog n

f=3^(n+1) g= 5^n

f=n! g= 2^n

f=2^n g= 2^n/2

f=2n+logn g = n+(logn)^2

f=nsqrt(n) g= 5^(log_2 (n))

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1
f = n! g = 2^n
for n > 2
   f(n) > g(n)

so f = Omega(g)

2.

f=(log n)^3 g = n

for n >=1
    f(n) < g(n)

So f = O(g)

3.

f= 5^n/2 g =2^n

for n >=1
    f(n) > g(n)

So f = Omega(g)

4.

f=logn! g= nlog n

n! is similar to nn, so f = log nn, = nlogn

So f = theta(g)

5

f=3^(n+1) g= 5^n

similar to 3

for n >= 3
g(n) > f(n)

so f(n) = O(g)

6

f=n! g= 2n

as said earlier n! ssimilar to nn. We are quite aware of that nn > 2n

so f = theta(g)

7

f=2^n g= 2^n/2

anytime
f(n) > g(n)

so f = theta(g)

8

f=2n+logn g = n+(logn)^2

f = 2n+logn =     n + n + log n

g = n + (logn)2 = n + log n * log n

clearly n + logn > log n * log n

9
f=nsqrt(n) g= 5^(log_2 (n))

exponential series is always > quadratic series

so

f(n) < g(n)

f = O(g)

Add a comment
Know the answer?
Add Answer to:
Consider the following function, select all the function and apply which one is f= 0(g), f=...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT