Every positive integer can be written as a product of primes, and finding that product is called integer factoring. It sounds elementary — yet no one knows a fast general algorithm, and the hardest instances safeguard modern encryption.
For most of history the best strategy was trial division: divide by 2, then 3, then 5, and so on. That works for small numbers, but for a 100-digit number it would take longer than the age of the universe.
In 1981, Carl Pomerance invented the Quadratic Sieve (QS) — an algorithm that runs in sub-exponential time, far faster than trial division, yet (so far as anyone knows) still not polynomial. It held the world speed record for factoring large integers through the 1980s and into the 1990s, and it still reigns for numbers up to roughly 100 digits.
The key insight is elegant: instead of dividing, hunt for pairs of numbers whose squares are congruent modulo — and build a system of equations over that, when solved, hands you a factor almost for free. See how factoring relates to public-key cryptography, and how P vs NP looms in the background.
Comments
Loading comments...