SUNY Geneseo Department of Computer Science


Recurrence Relations and Recursive Algorithms

{Date}

CSci 240, Spring 2007
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Misc

Problem set 7 due today

My solution to Lab 3 is on Web (see "Exercises" page for links to its pieces)

Faculty applicant (Suprakash Datta) interviewing Monday

Questions?

Mini-Assignment

Prove that h(n) = floor( n/2 ) is a closed form for the recurrence

Induction

Recurrence Relations and Algorithms

Section 7.2.2

Example

        factor( x, n )
            if n <= 1
                return 1
            else if x % n == 0
                return n
            else
                return factor( x, n-1 )

Next

Abstracting operation counts and time

Read sections 9.2.1 and 9.2.2


Next Lecture