Skip to main content
Top

2015 | OriginalPaper | Chapter

Easy Multiple-Precision Divisors and Word-RAM Constants

Author : Torben Hagerup

Published in: Mathematical Foundations of Computer Science 2015

Publisher: Springer Berlin Heidelberg

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

For integers \(b\ge 2\) and \(w\ge 1\), define the (b, w) cover size of an integer A as the smallest nonnegative integer k such that A can be written in the form \(A=\sum _{i=1}^k(-1)^{\sigma _i}b^{\ell _i}d_i\), where \(\sigma _i\), \(\ell _i\) and \(d_i\) are nonnegative integers and \(0\le d_i<b^w\), for \(i=1,\ldots ,k\). We study the efficient execution of arithmetic operations on (multiple-precision) integers of small (bw) cover size on a word RAM with words of w b-ary digits and constant-time multiplication and division. In particular, it is shown that if A is an n-digit integer and B is a nonzero m-digit integer of (bw) cover size k, then \(\lfloor A/B\rfloor \) can be computed in \(O(1+{{(k n+m)}/w})\) time. Our results facilitate a unified description of word-RAM algorithms operating on integers that may occupy a fraction of a word or several words.
As an application, we consider the fast generation of integers of a special form for use in word-RAM computation. Many published word-RAM algorithms divide a w-bit word conceptually into equal-sized fields and employ full-word constants whose field values depend in simple ways on the field positions. The constants are either simply postulated or computed with ad-hoc methods. We describe a procedure for obtaining constants of the following form in constant time: The ith field, counted either from the right or from the left, contains g(i), where g is a constant-degree polynomial with integer coefficients that, disregarding mild restrictions, can be arbitrary. This general form covers almost all cases known to the author of word-RAM constants used in published algorithms.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literature
1.
go back to reference Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading (1974)MATH Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading (1974)MATH
4.
go back to reference Cole, R., Vishkin, U.: Deterministic coin tossing with applications to optimal parallel list ranking. Inform. Control 70(1), 32–53 (1986)MathSciNetCrossRefMATH Cole, R., Vishkin, U.: Deterministic coin tossing with applications to optimal parallel list ranking. Inform. Control 70(1), 32–53 (1986)MathSciNetCrossRefMATH
5.
go back to reference Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47(3), 424–436 (1993)MathSciNetCrossRefMATH Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47(3), 424–436 (1993)MathSciNetCrossRefMATH
7.
go back to reference Graham, R.L., Knuth, D.E., Patashnik, O.: Concrete Mathematics: A Foundation for Computer Science. Addison-Wesley, Reading (1989)MATH Graham, R.L., Knuth, D.E., Patashnik, O.: Concrete Mathematics: A Foundation for Computer Science. Addison-Wesley, Reading (1989)MATH
8.
go back to reference Hagerup, T., Kammer, F.: Dynamic data structures for the succinct RAM (2015) (in preparation) Hagerup, T., Kammer, F.: Dynamic data structures for the succinct RAM (2015) (in preparation)
9.
go back to reference Knuth, D.E.: The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd edn. Addison-Wesley, Upper Saddle River (1998)MATH Knuth, D.E.: The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd edn. Addison-Wesley, Upper Saddle River (1998)MATH
10.
go back to reference Knuth, D.E.: The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1. Addison-Wesley, Upper Saddle River (2011) Knuth, D.E.: The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1. Addison-Wesley, Upper Saddle River (2011)
13.
go back to reference Warren Jr., H.S.: Hacker’s Delight, 2nd edn. Addison-Wesley, Upper Saddle River (2013) Warren Jr., H.S.: Hacker’s Delight, 2nd edn. Addison-Wesley, Upper Saddle River (2013)
Metadata
Title
Easy Multiple-Precision Divisors and Word-RAM Constants
Author
Torben Hagerup
Copyright Year
2015
Publisher
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-662-48054-0_31

Premium Partner