Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 5

Factoring Integer

Prepared by Abdataa.I
Introduction
• In number theory, integer factorization is the decomposition of a composite number into a product
of smaller integers. Factoring a large integer n seems to be much more difficult than simply
determining whether n is prime or composite.
• To factor an integer, simply break the integer down into a group of numbers whose product equals
the original number. Factors are separated by multiplication signs. Note that the number 1 is the
factor of every number. All factors of a number can be divided evenly into that number.

Pollard Rho Method

Pollard's Rho method is a Monte Carlo algorithm that usually finds a factor, not necessarily prime, of
an integer N in OiN1'4) arithmetic operations. The ideas behind Pollard's Rho method can be
described in gross terms3 as follows:
1. Given a composite number N, and p, an unknown factor of N, construct a sequence S that is
periodic mod p.
2. Determine the period of S.
3. Determine p using the above sequence and its period. The first thing we must do is find a way to
easily construct an integer sequence that is periodic mod p. Consider the sequence Sm (m a positive
integer), defined by, Sm {xi\xi = f(xi-i) mod m, Vi G Z+,0 < xq < m, f a polynomial}. (3) The
sequence Sm can be constructed by taking the successive functional composition of an initial value
(xq) for some polynomial / (throughout the
Concepts used in Pollard’s Rho Algorithm:

1. Two numbers x and y are said to be congruent modulo n (x = y modulo n) if


• their absolute difference is an integer multiple of n, OR,
• each of them leaves the same remainder when divided by n.
2. The Greatest Common Divisor is the largest number which divides evenly
into each of the original numbers.
3. Birthday Paradox: The probability of two persons having same birthday is
unexpectedly high even for small set of people.
4. Floyd’s cycle-finding algorithm: If tortoise and hare start at same point and
move in a cycle such that speed of hare is twice the speed of tortoise, then
they must meet at some point.
Algorithm

1. Start with random x and c. Take y equal to x and f(x) = x2 + c.


2. While a divisor isn’t obtained
a. Update x to f(x) (modulo n) [Tortoise Move]
b. Update y to f(f(y)) (modulo n) [Hare Move]
c. Calculate GCD of |x-y| and n
d. If GCD is not unity
I. If GCD is n, repeat from step 2 with another set of x, y and c
II. Else GCD is our answer

You might also like