Karatsuba algorithm
Builds on AlgorithmDivide-and-conquer algorithm
Definition
Fix an integer base . The Karatsuba algorithm is the recursive algorithm that computes the product of two non-negative integers as follows.
- If or , compute directly.
- Otherwise, let be the least integer with , and write and with .
- Compute recursively , and .
- Return .
The output is correct because , so the returned number equals .
Remarks
Example: with , , and , one gets , and . The result is .
Non-example: computing the four products , , , recursively is also correct, but it is not the Karatsuba algorithm. Its cost satisfies , which gives only .
For -digit inputs with about , the cost of the Karatsuba algorithm satisfies . By the master theorem, in asymptotic notation.
Reading path
To understand this page from the ground up, read these 3 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Algorithm concept
- Divide-and-conquer algorithm concept
- Karatsuba algorithm definition
Further reading
About this page
| Tag | EHH9KQHYFA |
|---|---|
| URI | m2://EHH9KQHYFA |
| Kind | definition |
| Writing | W0 stub |
| MSC | 68W30, 68W40, 11Y16 |
| Defines | Karatsuba algorithm |
| Uses | Algorithm, Divide-and-conquer algorithm |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.