Question

Prove that (f = O(g)] ^ (g = O(h)] = f = O(h).

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Proof:      
        Since f = O(g) and g = O(h) there exist positive integers k0, N0, k1,N1

s.t. f(n) <= k0g(n) for all n >= N0       ... (1)
and  g(n) <= k1h(n) for all n >= N1       ... (2)
Now let N = max {N0, N1}.  Then (1) and (2) both hold when n>= N
and we have f(n) <= k0g(n) for all n>= N.

        Since g(n) <= k1h(n) for all n>= N, this implies that 

        f(n) <= k0(k1h(n)) = k0k1h(n)  for all n >= N where k0k1 > 0 is a 
constant.  
Let k0k1 = k.  Then f(n) <= kh(n) for all n>= N.  So f = O(h)
Add a comment
Know the answer?
Add Answer to:
Prove that (f = O(g)] ^ (g = O(h)] = f = O(h).
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
ADVERTISEMENT