Question

Question 4: For each of the following, find the dominant term(s) having the sharpest increase in n and give the time complexi

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

Find the dominant term and Time complexity:

Expression 2n2log4n +30m2log100m 7(n+5y*+nlogn20 30n logn+3n log1On (2n3(10m))+)100 Dominant Term 2n log4n 7(n+5) 30nPlogn (n

Description:

(1) 2n2log4n + 30m2log100m (consider n > m)

Simplifying above expression to find time complexity:

2n2log4n + 30m2log100m

= 2n2(log104 + log10n) + 30m2 (log10100+ log10m)

= 2n2log104 + 2n2log10n +30m2log10100+30m2log10m

Since n>m Dominant term for expression 2n2log4n + 30m2log100m is 2n2​​​​​​​log4n

Time complexity: O(n2logn)

(2) 7(n+5)4 + nlogn20

Simplifying above expression to find time complexity:

7(n+5)4 + nlogn20

= 7(n4 +20n3 + 150n2 + 500n +625) + 20nlogn

= (7n4 +140n3 + 1050n2 + 3500n +4375) + 20nlogn

Dominant term for expression 7(n+5)4 + nlogn20  is 7(n+5)4

Time complexity: O(n4)

(3) 30n5logn + 3n log10n

Simplifying above expression to find time complexity:

30n5logn + 3n log10n

= 30n5logn + 3n log10n10

= 30n5logn + 30nlogn

Dominant term for expression 30n5logn + 3n log10n is 30n5logn

Time complexity: O(n5logn)

(4) (2n3(10m3)) + (n/2(n2))2 /100 (consider n > m)

Simplifying above expression to find time complexity:

(2n3(10m3)) + (n/2(n2))2 /100

= (2n3(10m3)) + ( (n/2)2 (n2)2 )/ 100

= 20n3 m3+ ((n2 * n4 ) / 200

= 20n3 m3 + n6 / 200

Since n>m Dominant term for expression (2n3(10m3)) + (n/2(n2))2 /100 is (n/2(n2))2 /100

Time complexity: O(n6)

Add a comment
Know the answer?
Add Answer to:
Question 4: For each of the following, find the dominant term(s) having the sharpest increase in...
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