mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > FactorDB

Reply
 
Thread Tools
Old 2009-09-04, 12:40   #562
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

3×1,129 Posts
Default Follow-up on Quick ECM

After another 80-100 submits on 30 or so numbers (along with previous observations) I find it can easily pull a p22, p23, p24 from larger numbers. But when the composite gets in the low c50s, it has a dickens of a time finding one. I guess it just needs a little more tweaking.

I'm still impressed how many factors can be found in less than two seconds.

P.S. I know it runs a max of four seconds but when the number is fully factored, the results are returned in less than two.
RichD is offline   Reply With Quote
Old 2009-09-04, 23:55   #563
Syd
 
Syd's Avatar
 
Sep 2008
Krefeld, Germany

23010 Posts
Default

Here is what the button does:

Code:
function quick_ecm($number_gecm) {
assert($number_gcem, INT_UNSIGNED);

$fnum = $numbers->get_by_id($number_qecm);
assert($fnum->valid(), true);

$time = new timer();
$time->set(4,0); // 4 seconds
$time->set_action("kill_ecm");

foreach($fnum->get_components() as $f) {
if($f->type != NUMBER_COMPOSITE && $f->type != NUMBER_UNKNOWN) continue;

if($f->digits() < 40) {
  exec("msieve -v \"".$f->get_base(10)."\"",$aus);
  parse_it($f, $aus);
} else {
  $counter = new db_counter($number_qecm);

  $thread = new threads();
  $thread->num = 3;
  if(!$counter->read()) { // P-1, P+1 only on first run
   $thread->addcmd("echo \"".$f->get_base(10)."\" | ecm -pm1 4000", 1); // Start low to avoid finding input number
   $thread->addcmd("echo \"".$f->get_base(10)."\" | ecm -pm1 600000", 1);
   $thread->addcmd("echo \"".$f->get_base(10)."\" | ecm -pp1 200000", 3);
  }
  $thread->addcmd("echo \"".$f->get_base(10)."\" | ecm -c 40 -v -I 3 1000", 3);
  $time->start();
  $thread->start();
  $time->stop();
  
  foreach($thread->get_output() as $out) parse_it($f,$out);
  if($f->type & NUMBER_FACTOR) {
    $counter->delete();
    quick_ecm($number_gecm); // Try again on remaining (composite)?
  } else {
    $counter->inc();
  }

}
}
1. 1 curve P-1 to B1=4k
2. 1 curve P-1 to B1=600k
3. 3 curves P+1 to B1=200k
4. 3 x "ecm -c 40 -v -I 3 1000"

Thats 3x40 curves per run, pulling out a p20 is not that unlikely.

These parameters are just guesses, maybe far from being optimal. Suggestions welcome!
Syd is offline   Reply With Quote
Old 2009-09-05, 03:58   #564
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

3×1,129 Posts
Default Quick ECM

I'm not sure what is going on with the code but several times I had a left-over c12. It took several submits to get the two p6's.

It looks like the msieve would get it the first time??
RichD is offline   Reply With Quote
Old 2009-09-06, 13:06   #565
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

67278 Posts
Default

Msieve uses trial division and pollard rho first, no 6-digit factors would survive that. Of course if the input is not factored msieve will then happily spend huge amounts of time trying to make further progress...
jasonp is offline   Reply With Quote
Old 2009-09-06, 17:10   #566
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

3·1,129 Posts
Default

Quote:
Originally Posted by jasonp View Post
Msieve uses trial division and pollard rho first, no 6-digit factors would survive that. Of course if the input is not factored msieve will then happily spend huge amounts of time trying to make further progress...
I understand what you are saying. The point I am trying to make is it takes several "submits" to break the c12. Since I don't understand the code Syd provided in post #563, it seems msieve is not called for what appears as < 40 digit input. It appears curves are thrown at it instead. I don't know!

I think the Quick ECM logic has changed again. You may not necessarily get all the factors within 4 seconds. Once it finds a factor (say > 2000?) it stops. You have to submit again on the remaining composite. But, if it can't find a single factor quickly, you do get more time than 4 seconds. In fact, quite a bit more it appears.
RichD is offline   Reply With Quote
Old 2009-09-06, 19:12   #567
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17·251 Posts
Default

Quote:
Originally Posted by RichD View Post
I understand what you are saying. The point I am trying to make is it takes several "submits" to break the c12. Since I don't understand the code Syd provided in post #563, it seems msieve is not called for what appears as < 40 digit input. It appears curves are thrown at it instead. I don't know!

I think the Quick ECM logic has changed again. You may not necessarily get all the factors within 4 seconds. Once it finds a factor (say > 2000?) it stops. You have to submit again on the remaining composite. But, if it can't find a single factor quickly, you do get more time than 4 seconds. In fact, quite a bit more it appears.
The code Syd posted means that if the number is under 40 digits, just send it to msieve (for msieve to crack using, apparently, trial division, pollard's rho, SIQS, etc.; whatever it does, it cracks any <c40 near-instantly), otherwise (i.e. the number is over 40 digits) go through the P-1, P+1, and ECM.

Last fiddled with by Mini-Geek on 2009-09-06 at 19:14
Mini-Geek is offline   Reply With Quote
Old 2009-09-06, 19:33   #568
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

3·1,129 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
The code Syd posted means that if the number is under 40 digits, just send it to msieve (for msieve to crack using, apparently, trial division, pollard's rho, SIQS, etc.; whatever it does, it cracks any <c40 near-instantly), otherwise (i.e. the number is over 40 digits) go through the P-1, P+1, and ECM.
Then why does it (sometimes) take multiple attempts to crack a c12?

P.S. I've also noticed it on c14 & c17, all with the two factors nearly equal.
RichD is offline   Reply With Quote
Old 2009-09-06, 19:52   #569
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

D3B16 Posts
Default Example

Quote:
Originally Posted by RichD View Post
Then why does it (sometimes) take multiple attempts to crack a c12?

P.S. I've also noticed it on c14 & c17, all with the two factors nearly equal.
Go to Home Prime Base 10, seq 8000. There is a c14 left-over. I've run Quick ECM on it 3 times.

Hopefully, to demonstrate my point, it won't crack on your first attempt.
RichD is offline   Reply With Quote
Old 2009-09-06, 20:12   #570
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17·251 Posts
Default

Quote:
Originally Posted by RichD View Post
Go to Home Prime Base 10, seq 8000. There is a c14 left-over. I've run Quick ECM on it 3 times.

Hopefully, to demonstrate my point, it won't crack on your first attempt.
huh...it cracked on my first attempt. Sorry.
(since it might be a bit hard to find now, it was 43847865855887)
I tried, locally, each of the factoring methods Syd posted before using the button, and any of the steps except the P+1 (which finds N, because it's overkill) will find the factors near-instantly.
Edit: (which means that there is 0 chance that all was working as it ought to for you) Do you use the DB logged in or not? Maybe that's got something to do with it, for some reason.

a few lines later, Quick ECM found a p25(!) from http://factordb.com/search.php?id=70125489, a c76. The last curve in Quick ECM requires 101 runs to expect a 25-digit factor.
and a few lines after that, I ran the Quick ECM-style curves locally and found a p24.

Last fiddled with by Mini-Geek on 2009-09-06 at 20:37
Mini-Geek is offline   Reply With Quote
Old 2009-09-07, 01:07   #571
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

3×1,129 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
Edit: (which means that there is 0 chance that all was working as it ought to for you) Do you use the DB logged in or not? Maybe that's got something to do with it, for some reason.
Ah, you might have a point Mini-Geek. I am logged in and the trial I was performing had all the other factors listed above the Quick ECM. In another words, I was going down the line picking primes off but left the c14 for last.

I'm not trying to be a Beavis about this just simply pointing out a few anomalies during my pseudo-testing. Perhaps, as a team effort, we can find optimal values for the Quick ECM as Syd suggested.

I have no idea what they would be but I am just providing a little feedback for discussion.

RichD.
RichD is offline   Reply With Quote
Old 2009-09-07, 01:20   #572
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

3·1,129 Posts
Default

As a follow up, the Quick ECM can easily find a low-to-mid p20 (within 2-3 attempts). The best I have seen was a p33. Larger numbers (c70-c80) can easily pull a p23 out as opposed to/from a c48. In another words, when the factors are about the same size it has a tough time.

This is a marvelous piece of work this FactorDB. I think it just needs a little more time to mature.

Edit: Hint, hint -- I need more points, more queue workers. :-)

Last fiddled with by RichD on 2009-09-07 at 01:31
RichD is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Database for k-b-b's: 3.14159 Miscellaneous Math 325 2016-04-09 17:45
Factoring database issues Mini-Geek Factoring 5 2009-07-01 11:51
database.zip HiddenWarrior Data 1 2004-03-29 03:53
Database layout Prime95 PrimeNet 1 2003-01-18 00:49
Is there a performance database? Joe O Lounge 35 2002-09-06 20:19

All times are UTC. The time now is 07:51.


Mon Aug 2 07:51:35 UTC 2021 up 10 days, 2:20, 0 users, load averages: 1.61, 1.54, 1.44

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.