13.4 POLLARD'S ρ-ALGORITHM [POLLARD, 1978]
If positive integers x and y in
can be found so that 1 < d = gcd{x − y, N} < N, then d is a factor of N.
Pairs (x, y) can be found by random trials, hence the name Monte Carlo; accordingly, a random function f mapping the integers in
into themselves is selected. The sequence x1, x2, … is determined by the rule
![]()
As we observed in Chapter 9, the f(n) must repeat before N − 1 iterations and the sequence
![]()
has
- A tail x1 → x2 = f(x1) → · · · → xk = f(xk−1), and
- Then enters a loop or cycle xk = f(xk−1) → … → xj+k = f(xj+k−1) = xk.
The name ρ chosen by Pollard for his algorithm is perfectly clear; the iterates of the mapping f appear like the Greek letter ρ.
Unfortunately N = O (2100) so that j + k could be very large and we cannot wait · · · and we do not have to, because of the Birthday Paradox.
13.4.1 The Birthday Paradox
What is the probability Pr{En} that in a class of n students, that no day is the birthday of two or more students?
Answer: Assuming that a year contains 365 days, the probability that no two students in a class of n have the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access