기억 효율적인 산술
Memory Efficient Arithmetic
Memory Efficient Arithmetic
@misc{croot2003memory,
title = {Memory Efficient Arithmetic},
author = {Ernie Croot},
year = {2003},
eprint = {math/0302315},
archivePrefix = {arXiv},
primaryClass = {math.NT},
url = {https://arxiv.org/abs/math/0302315}
}
Croot, E. (2003). Memory Efficient Arithmetic [Preprint]. arXiv. https://doi.org/10.48550/arXiv.math/0302315
CROOT E. Memory Efficient Arithmetic[EB/OL]. (2003-02-25)[2026-11-29]. https://arxiv.org/abs/math/0302315.
초록
이 논문에서는 정수 n 의 m 번째 b 진법 자리 (m=1은 최소가중 자리)를 계산하는 알고리즘을 제시한다. 실제로는 n/b^m bmod 1에 대한 날카로운 근사를 구한다. 여기서 n은 정수 시퀀스 s_1, s_2, dots, s_L=n의 마지막 항으로 정의되며, s_1=0, s_2=1이고, 각 s_i는 시퀀스 내의 두 이전 항 s_j들의 합, 곱 또는 차이다. 많은 경우, 이 알고리즘은 n의 모든 b진법 자리를 적는 데 필요한 메모리보다 훨씬 적은 메모리만 사용하여 m 번째 자리를 찾을 수 있으며, 비트 연산 수는 자릿수 대비 선형보다 약간 더만 증가한다. 이 결과의 한 가지 함의는 2^t의 m 번째 10진법 자리를 O(t^2/3 log^C t) 비트의 저장 공간과 O(t log^C t) 비트 연산으로 찾을 수 있다는 것이다 (여기서 C>0). 또한 이 알고리즘은 높은 병렬성을 가지며, M개의 프로세서를 사용하면 실행 시간을 M배 줄일 수 있으나, 필요한 메모리는 M배 증가한다.
In this paper we give an algorithm for computing the mth base-b digit (m=1 is the least significant digit) of an integer n (actually, it finds sharp approximations to n/b^m mod 1), where n is defined as the last number in a sequence of integers s1,s2,...,sL=n, where s1=0, s2=1, and each successive si is either the sum, product, or difference of two previous sj's in the sequence. In many cases, the algorithm will find this mth digit using far less memory than it takes to write down all the base-b digits of n, while the number of bit operations will grow only slighly worse than linear in the number of digits. One consequence of this result is that the mth base-10 digit of 2^t can be found using O(t^2/3 log^C t) bits of storage (for some C>0), and O(t log^C t) bit operations. The algorithm is also highly parallelizable, and an M-fold reduction in running time can be achieved using M processors, although the memory required will then grow by a factor of M.