SUNY Geneseo Department of Computer Science


Introduction to the Master Theorem

{Date}

CSci 240, Spring 2007
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Misc

Exam 1 Friday (Feb. 23)

Faculty applicant (Alexander Dekhtyar) interviewing today

Next applicant (Apan Qasem) interviewing Wednesday

Questions?

The Master Theorem

A shortcut for finding asymptotic closed forms for many recurrences that arise in analyzing algorithms.

Motivator / example: the algorithm for drawing rectangular patterns from our first lab

[Rectangles Recursively Inside Rectangles]

        To draw a pattern n pixels on a side
            if n > limit
                draw an n-by-n rectangle
                draw pattern n/2 pixels on a side in upper left
                draw pattern n/2 pixels on a side in upper right
                draw pattern n/2 pixels on a side in lower left
                draw pattern n/2 pixels on a side in lower right
            else
                draw an n-by-n rectangle

This recurrence combines 2 common patterns, each leading to a distinctive mathematical behavior in the closed form

The Master Theorem

Next

Understanding and using the Master Theorem


Next Lecture