Advertisement

Storage allocation for the Karatsuba integer multiplication algorithm

  • Roman E. Maeder
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 722)

Abstract

The Karatsuba (or 3-for-4) integer multiplication algorithm needs some amount of auxiliary memory (in addition to the memory needed to store the result). We give sharp upper and lower bounds for the amount of auxiliary storage required and discuss implementation issues. Since we must never allocate too few memory cells, an asymptotic formula is not sufficient. The bounds are 2(n−4 + 3⌈log2(n−3)⌋) and 2(n−6 + 2⌈log2(n−2)⌋), respectively. The formula for the amount of auxiliary storage is obtained by an exact closed-form solution of a recursion formula involving the floor and ceiling functions. Comparing the upper and lower bounds shows that this simple allocation formula does not waste much memory for any input size.

Keywords

Recursive Call Input Size Recursive Step Ceiling Function Storage Allocation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    A. Karatsuba and Yu. Ofman. Multiplication of many-digital numbers by automatic computers. Doklady Akademii nauk SSSR, 145(2), 1962. (in Russian).Google Scholar
  2. 2.
    A. Karatsuba and Yu. Ofman. Multiplication of multidigit numbers on automata. Soviet physics doklady, 7(7), 1963.Google Scholar
  3. 3.
    D. E. Knuth. Seminumerical Algorithms, volume 2 of The Art of Computer Programming. Addison-Wesley, second edition, 1981.Google Scholar
  4. 4.
    Donald E. Knuth, Ronald L. Graham, and Oren Patashnik. Concrete Mathematics. Addison-Wesley, 1989.Google Scholar
  5. 5.
    Wolfgang W. Kuechlin, David Lutz, and Nicholas Nevin. Integer multiplication in PARSAC-2 on stock microprocessors. In Proc. AAECC-9, New Orleans. Lecture Notes in Computer Science 539. Berlin: Springer 1991.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Roman E. Maeder
    • 1
  1. 1.Theoretical Computer Science ETH ZürichSwitzerland

Personalised recommendations