0% found this document useful (0 votes)
36 views5 pages

Master Method Intuition For The 3 Cases: Design and Analysis of Algorithms I

The document discusses the master method for analyzing divide and conquer algorithms. It introduces the three cases of the master method based on comparing the recurrence relation terms RSP and RWS. Case 1 is when RSP < RWS and the work decreases with recursion level j. Case 2 is when RSP > RWS and the work increases with j. Case 3 is when RSP = RWS and the work is the same at each j. The document also contains slides on the intuition behind the three cases and statements to check regarding how the work varies with recursion level j.

Uploaded by

navediitr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views5 pages

Master Method Intuition For The 3 Cases: Design and Analysis of Algorithms I

The document discusses the master method for analyzing divide and conquer algorithms. It introduces the three cases of the master method based on comparing the recurrence relation terms RSP and RWS. Case 1 is when RSP < RWS and the work decreases with recursion level j. Case 2 is when RSP > RWS and the work increases with j. Case 3 is when RSP = RWS and the work is the same at each j. The document also contains slides on the intuition behind the three cases and statements to check regarding how the work varies with recursion level j.

Uploaded by

navediitr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Design and

Analysis of
Algorithms I

Master
Method
Intuition for
the 3 Cases

Tim Roughgarden

How To Think About (*)


Our
upper bound on the work at level j:

Tim Roughgarden

Which of the following statements are true?


(Check all that apply.)
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.
No conclusions can be drawn about how the amount of
work varies with the recursion level j unless RSP and
RWS
equal.
If RSPare
and
RWS are equal, then the amount of work is
the same at every recursion level j.

Intuition for the 3 Cases


Upper

bound for level j:

Tim Roughgarden

The Master Method


If
then
if
if

(Case 1)
(Case 2)

if

(Case 3)

Tim Roughgarden

You might also like