Hacker News new | ask | show | jobs
by joshvm 3835 days ago
I would say factorisation is more tedious than hard. Modern computers can perform several billion operations per second. The simplest algorithms take O(N) time, that is to factorise N, you need to perform around N calculations. There are better algorithms which run in logarithmic time, so you only need log(N) calculations (and some which are better than that). Even with what you and I think of as big numbers, this is fast.

You get problems with numbers over 100 digits. I recently entered a challenge where one of the questions involved prime factoring a 130 digit number. That was a record feat a couple of decades ago, now it takes a day or two on a modern computer.

1 comments

Anyone care to elaborate on the downvote? Given that the parent seemed surprised that it was possible to factorise a 'big' number quickly on a modern PC, I thought I'd elaborate.

Brute force search is O(N), the sieve of Eratosthenes is O(N log(log(N))). The Quadratic sieve is good up to 100 digits and runs in O(exp(sqrt(log n log log n))). Some utilities you can use for this are YAFU, MSIEVE or GGNFS.