0

I am given a number n <= 10^85, I want to compute all of the divisors for the given n.

Till what number can I compute all of the divisors in under 5 seconds?

I am aware that the execution time of whatever algorithm is chosen depends on the hardware it is run on. Assume that it is run on an avarage developers pc, I am not expecting an exact number up to which I can compute the divisors, a rough estimate is sufficient.

I looked at several algorithms for finding the divisors and convinced my self that the answer must be < 10^85.

The algorithm I looked at.

How I tried to estimate the time (I used the running time of the algorithm above)

PlsWork
  • 1,958
  • 1
  • 19
  • 31

1 Answers1

1

Your first link says that it took 35 minutes for a 1.6 GHz UltraSparc III to factor a 267-bit semiprime. A 267-bit number is less than 1081, so it is four orders of magnitude smaller than 1085. The 1.6 GHz UltraSparc is not a typical desktop machine, at least not where I live, but we can suppose that msieve running on a typical desktop machine will have similar performance. Unless you feel that you can reimplement msieve several thousand times as fast, it seems unlikely that you could factor a 85-digit number in less than 5 seconds.

For what it's worth, on my core-i5 laptop msieve took 124 seconds to factor the 76-digit semiprime 1031024382763741345720693024144503046286361588371249770826450615723688608887, which is the product of two 38-digit primes. In 5 seconds, it was able to do the 62-digit semiprime 7308332279578159953175572146691794473667384671982397578861693, which is the product of a 32-digit prime and a 30-digit prime. [Note 1]

Your second link -- "how to estimate the time" -- is meaningless. The time estimate is not measured in any particular units; it is simply an indication of growth rate. If an algorithm runs in Θ(f(n)) and you compute f(n) as 1000 (or 8.61036E20), you know essentially nothing: The algorithm could take 1000 nanoseconds or it could take 1000 years.

Notes

  1. I found those semiprimes by using msieve to factor 20 random 128-bit numbers, which gave me six primes with 30 or more decimal digits.
Community
  • 1
  • 1
rici
  • 234,347
  • 28
  • 237
  • 341
  • Thanks for correcting my attempt to calculate the actual running time with the asymptotic bound, that was silly:p For future reference, I found what I was looking for here: https://www.gap-system.org/Manuals/pkg/factint/doc/chap4.html – PlsWork Jun 15 '17 at 19:14