java - Fast factoring algorithms? -
how can find factors of number?
e.g.:
digit: 20
factors: {1*20, 2*10, 4*5, 5*4, 10*2, 20*1}
this problem no solution known. reason, rsa encryption depends on computational difficulty of factoring numbers. see: integer factorization
however, may able speed algorithms given looking @ numbers square root of n
, , checking if factors checking if n % == 0
. if true, can find corresponding factor greater n^(.5)
taking n / i
.
Comments
Post a Comment