Easy Multiple-Precision Divisors and Word-RAM Constants

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...

Full description

Saved in:
Bibliographic Details
Published inMathematical Foundations of Computer Science 2015 Vol. 9235; pp. 372 - 383
Main Author Hagerup, Torben
Format Book Chapter
LanguageEnglish
Published Germany Springer Berlin / Heidelberg 2015
Springer Berlin Heidelberg
SeriesLecture Notes in Computer Science
Subjects
Online AccessGet full text
ISBN3662480530
9783662480533
ISSN0302-9743
1611-3349
DOI10.1007/978-3-662-48054-0_31

Cover

More Information
Summary: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 (b, w) cover size on a word RAM with words of wb-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 (b, w) 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.
Bibliography:Original Abstract: For integers \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$b\ge 2$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$w\ge 1$$\end{document}, 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 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$A=\sum _{i=1}^k(-1)^{\sigma _i}b^{\ell _i}d_i$$\end{document}, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sigma _i$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell _i$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d_i$$\end{document} are nonnegative integers and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$0\le d_i<b^w$$\end{document}, for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i=1,\ldots ,k$$\end{document}. We study the efficient execution of arithmetic operations on (multiple-precision) integers of small (b, w) cover size on a word RAM with words of wb-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 (b, w) cover size k, then \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lfloor A/B\rfloor $$\end{document} can be computed in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(1+{{(k n+m)}/w})$$\end{document} 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.
ISBN:3662480530
9783662480533
ISSN:0302-9743
1611-3349
DOI:10.1007/978-3-662-48054-0_31