大整数减法的顺序与并行算法
Sequential & Parallel Algorithms for Big-Integer Numbers Subtraction
摘要:
许多新兴的计算机应用程序需要处理大量的数据,超过了CPU的处理能力。事实上,顶级PC只能处理不超过32位或64位的数字。这是由于寄存器的大小和CPU内部的数据路径。因此,在某种程度上,对大整数执行诸如减法之类的算术运算是有限的。为了解决这个问题,设计了不同的算法;它们都是通过首先将大整数转换为二进制表示,然后对单个位执行逐位操作来操作大整数。这类算法的复杂度为O(n),其中n是每个操作数的总位数。本文提出了两种新的大整数算术减法算法。这两种算法的不同之处在于,一种是串行的,而另一种是并行的。它们之间的相似之处在于,两者都遵循相同的概念,即将大整数输入分为几个60位(18位)的块或令牌;从而将O(n)中的输入大小n减少了60倍。从每个操作数中减去一个相应的标记,就像人类执行减法一样,使用十进制系统中的铅笔和纸。这两种算法都将使用MS C#.NET 2005实现,并在多处理器系统上进行测试。可以对加法和乘法等其他算术运算做进一步的研究。
英文摘要:
Many emerging computer applications require the processing of large numbers, larger than what a CPU can handle. In fact, the top of the line PCs can only manipulate numbers not longer than 32 bits or 64 bits. This is due to the size of the registers and the data-path inside the CPU. As a result, performing arithmetic operations such as subtraction on big-integer numbers is to some extend limited. Different algorithms were designed in an attempt to solve this problem; they all operate on big-integer numbers by first converting them into a binary representation then performing bitwise operations on single bits. Such algorithms are of complexity O(n) where n is the total number of bits in each operand. This paper proposes two new algorithms for performing arithmetic subtraction on big-integer numbers. The two algorithms are different in that one is sequential while the other is parallel. The similarity between them is that both follow the same concept of dividing the big-integer inputs into several blocks or tokens of 60 bits (18 digits) each; thus reducing the input size n in O(n) by a factor of 60. Subtraction of corresponding tokens, one from each operand, is performed as humans perform subtraction, using a pencil and a paper in the decimal system. Both algorithms are to be implemented using MS C#.NET 2005 and tested over a multiple processor system. Further studies can be done on other arithmetic operations such as addition and multiplication.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。