.

Thursday, May 9, 2013

Master Theorem

Notes maitre dhotel Theorem Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry resile 2006 Computer comprehension & engineer 235 Introduction to Discrete Mathematics cse235@cse.unl.edu rule Theorem I Notes When analyzing algorithms, recall that we b arely reverence about the asymptotic behavior. recursive algorithms are no di?erent. quite a than solve exactly the coming back relation associated with the hail of an algorithm, it is becoming to give an asymptotic characterization. The main(prenominal) tool for doing this is the rule theorem. arrive at Theorem II Notes Theorem ( police captain Theorem) allow T (n) be a mo nononically change magnitude function that satis?es T (n) = aT ( n ) + f (n) b T (1) = c where a ? 1, b ? 2, c > 0. If f (n) ? ?(nd ) ? if ? ?(nd ) ?(nd poundarithm n) if T (n) = ? ?(nlogb a ) if where d ? 0, then a < bd a = bd a > bd insure Theorem Pitfalls Notes You cannot use the Master Theorem if T (n) is not monotone, ex: T (n) = sin n f (n) is not a polynomial, ex: T (n) = 2T ( n ) + 2n 2 ? b cannot be expressed as a constant, ex: T (n) = T ( n) Note here, that the Master Theorem does not solve a return key relation. Does the base eggshell turn off a concern? Master Theorem subject 1 Notes Let T (n) = T n 2 + 1 n2 + n. What are the parameters? 2 a = 1 b = 2 d = 2 thusly which peg gloomy? Since 1 < 22 , case 1 applies.
Ordercustompaper.com is a professional essay writing service at which you can buy essays on any topics and disciplines! All custom essays are written by professional writers!
indeed we application that T (n) ? ?(nd ) = ?(n2 ) Master Theorem Example 2 Notes ? Let T (n) = 2T n 4 + n + 42. What are the parameters? a = 2 b = 4 d = 1 2 wherefore which condition? Since 2 = 4 2 , case 2 applies. Thus we conclude that ? T (n) ? ?(nd log n) = ?( n log n) 1 Master Theorem Example 3 Notes Let T (n) = 3T n 2 + 3 n + 1. What are the parameters? 4 a = 3 b = 2 d = 1 Therefore which condition? Since 3 > 21 , case 3 applies. Thus we conclude that T (n) ? ?(nlogb a ) = ?(nlog2 3 ) Note that log2 3 ? 1.5849 . . .. undersurface we say that T (n) ? ?(n1.5849 ) ? Fourth Condition...If you want to shake up a full essay, regularize it on our website: Ordercustompaper.com

If you want to get a full essay, wisit our page: write my paper

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.