Java Program to Implement the Schonhage-Strassen Algorithm for Multiplication of Two Numbers
Schonhage-Strassen algorithm is one of the fastest ways of multiplying very large integer values (30000 to 150000 decimal digits). This algorithm was developed by Arnold Schönhage and Volker Strassen. Though the Furer’s algorithm is faster than that of Schonhage-Strassen’s algorithm, there are no practical applications for it, except Galactic algorithms (probably not used for any data present on the earth). So, Schonhage-Strassen’s algorithm is considered the best for multiplying large integer values.
In this approach of multiplication, the two integers are first multiplied without performing carry. The result set then obtained is called Acyclic Convolution or Linear Convolution. Then we perform carry on the individual columns of the Linear Convolution.
The Linear Convolution is: [ 2 22 50 14 44 4 8 ] The Product is : 4718448
Time Complexity: O(n. log n . log log n )
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.