SUNY Geneseo Department of Computer Science


Intractability and Factoring

{Date}

CSci 141, Fall 2003
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture


Misc

Hand out Homework 3

End-of-Semester

Questions?

Optimality of Towers of Hanoi

Last class we realized that the number of times the best Towers of Hanoi solver moves a disk is

Which we asserted has closed form B(n) >= 2n - 1

Mini-assignment: prove that this is the correct closed form for the recurrence

Open Questions about Optimality

Read Section 16.3 (open problems)

Factoring

Given a natural number, n, find 2 other smaller naturals a, b, such that n = a*b

Factoring is solvable

    factor(n)
        for i = 2 to n-1
            if n / i is a whole number
                return < i, n/i >

Worst case: n-2 iterations of loop

But n isn't the right measure of problem size

See thawte.com re SSL security, cryptography contests


Next Lecture