基于k-ary消减的快速最大公约数算法  被引量:1

Fast greatest common divisor algorithm based on k-ary reduction

在线阅读下载全文

作  者:王广赛 曾光[1,2] 韩文报[1,2] 李永光[1,2] 

机构地区:[1]信息工程大学,郑州450001 [2]数学工程与先进计算国家重点实验室,郑州450001

出  处:《计算机应用》2015年第6期1673-1677,1697,共6页journal of Computer Applications

基  金:国家自然科学基金资助项目(61003291);数学工程与先进计算国家重点实验室开放课题基金资助项目(2013A03;2013A10)

摘  要:最大公约数(GCD)算法中,对于输入B和C,利用Sorenson的右移k-ary消减思想提出一个算法用于寻找整数x和y,使得x和y满足Bx-Cy在二进制表示下低比特位部分为0,即Bx-Cy=0(mod 2e),其中e是常数正整数。利用该算法能够右移较多比特并大规模降低循环次数。再结合模算法,提出了快速GCD算法,其输入规模为n比特时最差复杂度仍然是O(n2),但最好的情况下复杂度能达到O(n log2n log log n)。实验数据表明,对于20万以上比特规模的输入,快速GCD算法比Binary GCD算法速度快;对100万比特规模的输入,快速GCD算法速度是Binary GCD算法的两倍。Greatest Common Divisor (GCD) is one of the basic subjects in computational number theory. It has a wide application in encryption and analysis of cryptography. For inputing B and C, an algorithm based on right-shift k-ary reduction proposed by Sorenson was presented for finding the integers x and y which satisfy the least significant bits ofBx - Cy were 0, i. e., Bx - Cy = 0( mod 2e ) where positive integer e was a constant. It could do a lot of right shifts and reduce a large number of cycles with taking advantage of the algorithm for finding the integers x and y. A fast GCD algorithm was proposed combined with modulus algorithm. When the size of the input was n bits, the worst complexity of the fast GCD algorithm was still O( n^2) . In the best case, the complexity of the proposed algorithm could achieve O ( n log^2 n log log n ). The experimental data show that actual implementations given input about more than 200 000 bits, the fast GCD algorithm is faster than the Binary GCD algorithm, and the fast GCD algorithm is twice as fast as the Binary GCD algorithm for 1 million bits of input.

关 键 词:最大公约数算法 欧几里得算法 二进制最大公约数算法 右移k-ary消减 整数最大公约数算法 

分 类 号:N309[自然科学总论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象