Questions tagged [karatsuba]

Asymptotically fast multiplication algorithm for big integers. Understanding this algorithm and its implementations.

Karatsuba algorithm requires O(nlog₂3) single digit multiplication operations to multiply a pair of n-digit numbers and is therefore asymptotically faster than the common O(n²) multiplication algorithm.

It was proposed by Anatoly Karatsuba in a paper published in the Proceedings of the USSR Academy of Science in 1962.

A related tag is that covers both Schönhage–Strassen multiplication algorithm and Strassen matrix multiplication algorithm.

Useful links

92 questions
-1
votes
1 answer

Karatsuba Algorithm: splitting strings

I am trying to implement the Karatsuba algorithm in C. I work with char strings (which are digits in a certain base), and although I think I have understood most of the Karatsuba algorithm, I do not get where I should split the strings to…
-2
votes
1 answer

Getting karatsuba multiplication wrong somewhere

So i'm new to python and wrote this code from a pseudocode for karatsuba multiplication and am getting an logical error of some sort here is the pseudo code I used: procedure karatsuba(num1, num2) if (num1 < 10) or (num2 < 10) return…
1 2 3 4 5 6
7