Lecture 13: Introduction to Integer Factorization Algorithms

Background Material


With primality tests, we know that a number is likely composite before we try to find the factors. This provides a fundamental change in the point of view of the factoring algorithms we consider next. We no longer provide algorithms that both determine primality and find factors. Moreover, we are happy to find a single factor (check to see if it is prime) and continue recursively with many different algorithms rather than provide algorithms that find all factors. Typically, we search for small, moderate, and large factors with different algorithms. Moreover, we will give up determinism and settle for non-deterministic algorithms that may not succeed, but when they do, typically find factors much faster than deterministic algorithms. In this lecture we look at an algorithm (Pollard Rho) for finding modest size factors (small factors are found by trial division). In the next lecture we will look at an algorithm for finding larger factors (quadratic sieve). Other possible algorithms exist for both tasks and are discussed in the book.


  1. Review trial division approach and its shortcomings.
  2. Fermat's algorithm (sec. 5.1)
  3. Kraitchik's improvement (sec. 5.2)
  4. Pollard Rho algorithm (sec. 5.3) for finding moderately sized factors.

Maple Worksheet

  1. pollardrho.mw - Maple worksheet implementing Fermat's algorithm and the Pollard Rho algorithm.

Practice Assignment

  1. Exc. 5.2, 5.9, 5.10, 5.11, 5.12, 5.16, 5.17.
Created: June 1, 2008 by jjohnson AT cs DOT drexel DOT edu