Prime factorization for big numbers

做~自己de王妃 提交于 2019-12-23 21:33:34

问题


I am trying to find the complexity of a factorization for big numbers. Which is the best algorithm and which is the complexity of finding a number's prime factors? Assume that the length of the number is n.


回答1:


The best know algoritm for factoring integer larger than 100 digits is General number field sieve. It's complexity is explained on the page that the link links to.

Wikipedia has a nice article about other algoritms: http://en.wikipedia.org/wiki/Integer_factorization




回答2:


the complexity will be sqrt(n)log(n).But for n<=19^7 if you use sieve then after sieve it can be done in log(n). You can see here -> http://codeforces.com/blog/entry/7262



来源:https://stackoverflow.com/questions/10564153/prime-factorization-for-big-numbers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!