Jump to content

Dixon's factorization method

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Decrypt3 (talk | contribs) at 13:08, 2 October 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In number theory, Dixon's factorization method (also Dixon's algorithm) is a general-purpose integer factorization algorithm. The quadratic sieve is a modifications of the basic idea used in Dixon's method.

Basic idea

Dixon's method is based on finding a congruence of squares. The naïve method of finding such a congruence is to select random x values and hope that it satisfies the congruence:

where n is the integer to be factorized. In practice, selecting random x values will take an impractically long time to find a congruence of squares. Dixon's method is based on satisfying a much weaker condition many times, and the results of these values can be combined into a congruence of squares.

Method

Firstly, a set of primes less than some bound B is chosen. This set of primes is called the factor base. Then, using the polynomial

many values of x are tested to see if p(x) factors completely over the factor base. If it does, the pair (x,p(x)) is stored. Such a pair is called a relation. Then, once the number of relations collected exceeds the size of the factor base, we can enter the next stage.

The p(x) values are factorized (this is easy since we are certain they factorize completely over the factor base) and the exponents of the prime factors are converted into an exponent vector mod 2. For example, if the factor base is {2, 3, 5, 7} and the p(x) value is 30870, we have:

This gives an exponent vector of:

If we can find some way to add these exponent vectors together (equivalent to multiplying the corresponding relations together) to produce the zero vector (mod 2), then we can get a congruence of squares. Thus we can put the exponent vectors together into a matrix, and formulate an equation:

This can be converted into a matrix equation:

This matrix equation is then solved (using, for example, Gaussian elimination) to find the vector c. Then:

where the products are taken over all k for which ck = 1. Because of the way we have solved for c, the right-hand side of the above congruence is a square. We then have a congruence of squares.

Optimizations

The quadratic sieve is an optimizations of Dixon's method. It solves a quadratic congruence to find suitable x values much faster than simply by random selection.

Other ways to optimize Dixon's method include using a better algorithm to solve the matrix equation. In practice, the Lanczos algorithm is often used. Also, the size of the factor base must be chosen carefully. If it is too small, it will be difficult to find numbers that factorize completely over it. If it is too large, more relations will have to be collected.