![]() |
|
|
#1 |
|
"James Short"
Mar 2019
Canada
2·32 Posts |
First post here - sorry if this is either an obvious or mundane question.
The Pollard Rho factoring method is suppose to have a running time proportional to ), is it known to factor I've tested it on the first three composite Mersenne integers ………...…………………......…. (Note - Carl Pomerance suggests using an iterating function of |
|
|
|
|
|
#2 |
|
Nov 2005
22×33 Posts |
Hello, welcome to the forum.
The pollard rho can be tweaked to work nicely for Fermat numbers. The Funktion to generate the numbers has to be modified here. With this modification it was possible to give one factor of F_8 = 2^(2^8) + 1 by choosing f(x) = x^(2^(8+2)) + 1 see : https://maths-people.anu.edu.au/~brent/pd/rpb061.pdf I did not read the article but the same approach might also work for Mersenne numbers. Brent has found factors of M227, M199 with it. http://centaur.reading.ac.uk/4571/1/...ne_Numbers.pdf |
|
|
|
|
|
#3 |
|
"James Short"
Mar 2019
Canada
1810 Posts |
Thanks for the reference ThilaHarich….
Yeah the factorization of As you mentioned, he applied the iteration function I won't go into the specific details. They are based on probabilistic assumptions or heuristic arguments, however many textbooks like to use the Birthday Problem as an explanatory analogy: https://en.wikipedia.org/wiki/Birthday_problem Re - further speed-ups to the above Brent was likely aware of this, however the iteration function he used could've been given another boost! He used the function However had Brent used the iterating function In general, if we let This can be applied to Mersenne integers as well, since any prime factor Anyway, this doesn't have anything to do with the idea of using |
|
|
|
|
|
#4 |
|
Sep 2009
9A016 Posts |
Would it be possible to combine Rho factoring with a LL test? If residues in a LL test start to repeat would that mean you have found a factor? How likely would it be to find a factor that hasn't been found by TF or P-1?
This assumes the overhead for the extra calculations would be paid for by the chance of finding a factor. Chris |
|
|
|
|
|
#5 |
|
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
3·23·89 Posts |
Experiments would have to be done but I suspect that it might always need more iterations for rho to find a factor than to test primality via LL. Plus you would have to store all the full iterations which would be nontrivial for the huge numbers we test nowadays. It would be great if someone could prove me wrong though. I suspect it possible to prove me right though. Who will accept this challenge?
|
|
|
|
|
|
#6 |
|
Sep 2002
Vienna, Austria
3·73 Posts |
I believe that using x-->x^2-2 in the rho method causes the cycle to be length O(p) instead of O(sqrt(p)).
For instance, for the prime factor 228479 of M71, x-->x^2-1 finds a cycle in 658 iterations, while x-->x^2-2 requires 7035 iterations. |
|
|
|
|
|
#7 | |
|
Sep 2009
25·7·11 Posts |
Quote:
My plan was to run rho for a suitable number of cycles, then switch to a normal LL test if we havn't found a factor. If it's worth doing any rho cycles though. Chris |
|
|
|
|
|
|
#8 |
|
Romulan Interpreter
"name field"
Jun 2011
Thailand
41×251 Posts |
That is not feasible, you need to store ALL residues, and check at every iteration, because you don't know the period after which they repeat. If you know the period, then you know an order of some non-square, so you can find a factor. Of course, you may store only a part of each residue, or some CRC/hash of it, to be easy to check, but in that case, when you have a match you have to repeat the test and keep full residues to see if it is really a match.
Also, residues repeat after some order of the factors, and because factors are 2kp+1, it may be that this order is larger than p. For example, order of 3 in 2^11-1 is 88. If you know this, you get immediately the factor (89), but as you only make p-1 iterations (here 10), you will never find the fact that residues repeat. If you start a PRP test with base 3, the residues will start repeating after 88 iterations, and for LL test, they may repeat after 60. Edit: @jshort: can you factor M727, or at least M523 with that "combined" method? If so, I would be interested in it... :) Last fiddled with by LaurV on 2019-03-20 at 07:46 |
|
|
|
|
|
#9 | |||
|
"James Short"
Mar 2019
Canada
2×32 Posts |
Quote:
You generally only need to store one residue. It's a "reference" point that we assume is already inside the periodic cycle for which we compare future residues with. If our assumption is wrong, then we abandon this residue and pick one further down in the sequence. Another method which requires no storing and very easy to program is to simply define two sequences where one is simply a double iteration of the other. Here is a pari/gp example of this method: rho(n) = { my(x=4, y=14); while (gcd(y-x,n) == 1, x = (x^2 -2) % n; y = (y^2 - 2) % n; y = (y^2 - 2) % n; ); gcd(y-x,n); } For arbitrary integers n, x^2 - 2, should be avoided because it doesn't form a Monte Carlo random walk over rho(n) = { my(x=2, y=5); while (gcd(y-x,n) == 1, x = (x^2 + 1) % n; y = (y^2 + 1) % n; y = (y^2 - 2) % n; ); gcd(y-x,n); } Quote:
Do you mind posting your code or describing the algorithm you used? Quote:
|
|||
|
|
|
|
|
#10 | |
|
"Luke Richards"
Jan 2018
Birmingham, UK
12016 Posts |
Quote:
https://en.wikipedia.org/wiki/Pollar...ithm#Algorithm https://en.wikipedia.org/wiki/Cycle_...toise_and_Hare |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Factoring Mersenne numbers | paulunderwood | Miscellaneous Math | 18 | 2017-08-27 14:56 |
| 2 holes in bizarre theorem about composite Mersenne Numbers | wildrabbitt | Math | 120 | 2016-09-29 21:52 |
| lag in factoring Mersenne numbers (P < 10000)? | ixfd64 | Factoring | 1 | 2006-01-02 08:25 |
| Factoring highly composite Mersenne numbers | philmoore | Factoring | 21 | 2004-11-18 20:00 |