The.Algorithm.Design.Manual.Springer-Verlag.1998

The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998

18.04.2013 Views

Lecture 3 - recurrence relations The term should now be obvious. Although there are only terms before we get to T(1), it doesn't hurt to sum them all since this is a fast growing geometric series: Listen To Part 3-8 Recursion Trees Drawing a picture of the backsubstitution process gives you a idea of what is going on. We must keep track of two things - (1) the size of the remaining argument to the recurrence, and (2) the additive stuff to be accumulated during this call. Example: The remaining arguments are on the left, the additive terms on the right. Although this tree has height , the total sum at each level decreases geometrically, so: The recursion tree framework made this much easier to see than with algebraic backsubstitution. file:///E|/LEC/LECTUR17/NODE3.HTM (5 of 10) [19/1/2003 1:34:27]

Lecture 3 - recurrence relations Listen To Part 3-9 See if you can use the Master theorem to provide an instant asymptotic solution The Master Theorem: Let and b>1 be constants, let f(n) be a function, and let T(n) be defined on the nonnegative integers by the recurrence where we interpret n/b as or . Then T(n) can be bounded asymptotically as follows: 1. If for some constant , then . 2. If , then . 3. If for some constant , and if for some constant c

Lecture 3 - recurrence relations<br />

Listen To Part 3-9<br />

See if you can use the Master theorem to provide an instant asymptotic solution<br />

<strong>The</strong> Master <strong>The</strong>orem: Let and b>1 be constants, let f(n) be a function, and let T(n) be defined on<br />

the nonnegative integers by the recurrence<br />

where we interpret n/b as or . <strong>The</strong>n T(n) can be bounded asymptotically as follows:<br />

1. If for some constant , then .<br />

2. If , then .<br />

3. If for some constant , and if for some constant c

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!