Search results
Results from the WOW.Com Content Network
[1] [2] [3] It is a divide-and-conquer algorithm that reduces the multiplication of two n-digit numbers to three multiplications of n/2-digit numbers and, by repeating this reduction, to at most single-digit multiplications.
More formally, multiplying two n-digit numbers using long multiplication requires Θ(n 2) single-digit operations (additions and multiplications). When implemented in software, long multiplication algorithms must deal with overflow during additions, which can be expensive.
Trachtenberg defined this algorithm with a kind of pairwise multiplication where two digits are multiplied by one digit, essentially only keeping the middle digit of the result. By performing the above algorithm with this pairwise multiplication, even fewer temporary results need to be held. Example:
Multiplication can also be thought of as scaling. Here, 2 is being multiplied by 3 using scaling, giving 6 as a result. Animation for the multiplication 2 × 3 = 6 4 × 5 = 20. The large rectangle is made up of 20 squares, each 1 unit by 1 unit. Area of a cloth 4.5m × 2.5m = 11.25m 2; 4 1 / 2 × 2 1 / 2 = 11 1 / 4
Algorithm Complexity Addition: Two -digit numbers One +-digit number Schoolbook addition with carry Subtraction: Two -digit numbers One +-digit number Schoolbook subtraction with borrow Multiplication
The run-time bit complexity to multiply two n-digit numbers using the algorithm is ( ) in big O notation. The Schönhage–Strassen algorithm was the asymptotically fastest multiplication method known from 1971 until 2007.
As an example, consider the multiplication of 58 with 213. After writing the multiplicands on the sides, consider each cell, beginning with the top left cell. In this case, the column digit is 5 and the row digit is 2. Write their product, 10, in the cell, with the digit 1 above the diagonal and the digit 0 below the diagonal (see picture for ...
Multiplication algorithm; ... In binary encoding each long number is multiplied by one digit (either 0 or 1), and that is much easier than in decimal, as the product ...