algo master5 annotated

5
Tim Roughgarden Master Method Intuition for the 3 Cases Design and Analysis of Algorithms I

Upload: navediitr

Post on 05-Dec-2015

214 views

Category:

Documents


2 download

DESCRIPTION

algo master 5 annotated

TRANSCRIPT

Page 1: Algo Master5 Annotated

Tim Roughgarden

Master MethodIntuition for the 3 Cases

Design and Analysis of Algorithms I

Page 2: Algo Master5 Annotated

Tim Roughgarden

How To Think About (*)Our upper bound on the work at level j:

Page 3: Algo Master5 Annotated

Which of the following statements are true? (Check all that apply.)

No conclusions can be drawn about how the amount of work varies with the recursion level j unless RSP and RWS are equal.

If RSP < RWS, then the amount of work is decreasing with the recursion level j.

If RSP > RWS, then the amount of work is increasing with the recursion level j.

If RSP and RWS are equal, then the amount of work is the same at every recursion level j.

Page 4: Algo Master5 Annotated

Tim Roughgarden

Intuition for the 3 CasesUpper bound for level j:

Page 5: Algo Master5 Annotated

Tim Roughgarden

The Master MethodIf then if (Case 1) if (Case 2) if (Case 3)