The multiplication you learned in school — multiply every digit of one number by every digit of the other, then add — costs roughly small multiplications for two -digit numbers. Fine for a phone number, painful for the thousand-digit numbers that show up in cryptography or the million-digit numbers computer algebra systems chase for fun.
In 1963 Anatoly Karatsuba showed you don't need every one of those products: split each number into two halves and, with a little algebraic sleight of hand, multiply them using only three half-size multiplications instead of four. Andrei Toom and later Stephen Cook (1966) generalized the idea — split into pieces instead of two, and the same trick still works, trading more bookkeeping for an even better speedup.
The result is a whole family of algorithms — Toom-2 (Karatsuba), Toom-3, Toom-4, and beyond — that turn one big multiplication into several smaller ones plus some cheap linear algebra.
Comments
Loading comments...