mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > FactorDB

Reply
 
Thread Tools
Old 2012-03-26, 19:15   #1
chris2be8
 
chris2be8's Avatar
 
Sep 2009

5·389 Posts
Default Automatically updating factordb

Hello,

I'm using SNFS to factor some of the smaller composites in factordb. I'm using code copied from firejuggler's yafu.pl script from http://mersenneforum.org/showthread.php?t=16359&page=3 post 65. But it only seems to work about half the time.

An example failure is when I generate the url:
http://factorization.ath.cx/report.php?report=(10^110*4513+883)/9985751%3D67180229841217849970082301271*672733594449015022926507086465812106323889333502525331018102445134797068313923

I can't see any difference between requests that work and those that fail. Should I update my script to try again a few times if the update fails? Or is there a more robust technique?

Chris K
chris2be8 is offline   Reply With Quote
Old 2012-03-28, 02:52   #2
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

2·7·227 Posts
Default

I ran into a length problem so I changed it to two inquiries. Given your example I would fetch the internal ID first by:

Code:
http://factordb.com/index.php?query=%2810%5E110*4513+883%29%2F9985751
Parse the html source to get the ID of the form 1100000000456380365 (19-digit) number then report a single factor with wget.

Code:
wget -q -O /dev/null --post-data="report=67180229841217849970082301271&format=0" http://factordb.com/index.php?id=1100000000456380365
The remaining factor will be computed by the DB. No need to send it.

This may not be the best way to report it but it works for me.
RichD is offline   Reply With Quote
Old 2012-03-29, 10:27   #3
VolMike
 
VolMike's Avatar
 
Jun 2007
Moscow,Russia

7·19 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
Hello,

I'm using SNFS to factor some of the smaller composites in factordb. I'm using code copied from firejuggler's yafu.pl script from http://mersenneforum.org/showthread.php?t=16359&page=3 post 65. But it only seems to work about half the time.

An example failure is when I generate the url:
http://factorization.ath.cx/report.php?report=(10^110*4513+883)/9985751%3D67180229841217849970082301271*672733594449015022926507086465812106323889333502525331018102445134797068313923

I can't see any difference between requests that work and those that fail. Should I update my script to try again a few times if the update fails? Or is there a more robust technique?

Chris K
Some string patterns of factorization number should be replaced for compatability with factrodb.com requests syntax. Replacement rules are shown below in "a" -> "b" form:

Code:
                "%" -> "%25"
		"!"   -> "%21"
		"+"  -> "%2B"
		"("   -> "%28"
		")"   -> "%29"
		"/"   -> "%2F"
		"^"  -> "%5E"	
		"#"  ->  "%23"
These patterns have been found by me due the experiments with url requests.

The attach below is modified version of yoyo perl script (http://www.rechenkraft.net/wiki/inde...:Yoyo/factordb), which is used to factor numbers from input file by yafu and post results to factordb. This script can handle numbers with any patterns shown above. You need yafu binary and yafu.in with numbers in the same folder with attach.
factor_in.zip

Last fiddled with by VolMike on 2012-03-29 at 10:29
VolMike is offline   Reply With Quote
Old 2012-03-29, 18:48   #4
chris2be8
 
chris2be8's Avatar
 
Sep 2009

5·389 Posts
Default

Thanks VolMike, that looks to have fixed it. 5 results so far after adding it to my script, all OK.

I've also got code to write an error report if I don't get either a "Factor added" or "Factor already known" in the response. That will catch other issues such as my internet connection failing.

Chris K
chris2be8 is offline   Reply With Quote
Old 2012-03-29, 19:35   #5
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·2,399 Posts
Default

Quote:
Originally Posted by VolMike View Post
These patterns have been found by me due the experiments with url requests.
HTTP requests are limited to the ASCII character set, and characters with special meaning must also be encoded.

http://www.blooberry.com/indexdot/ht...rlencoding.htm

Last fiddled with by Dubslow on 2012-03-29 at 19:35 Reason: and characters with special meaning must also be encoded.
Dubslow is offline   Reply With Quote
Old 2012-03-31, 16:23   #6
chris2be8
 
chris2be8's Avatar
 
Sep 2009

36318 Posts
Default

I've had another look, now I know what to look for I can see that it didn't like a + in the url. Every attempt with a + in it failed, all but 1 of the rest worked (I think the exception was the router rebooting itself at the wrong moment). With the + encoded they all work.

Chris
chris2be8 is offline   Reply With Quote
Old 2012-03-31, 18:20   #7
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

2×7×227 Posts
Default

Sorry, that was my mistake above for misleading you with the + sign.

Thanks to VolMike for pointing that out - and the other symbols.

I've been doing some work with OPN and it never has a plus sign in any of the expressions.
(Now back to correcting my program should one day I need it for a + sign.)
RichD is offline   Reply With Quote
Old 2012-05-01, 17:27   #8
chris2be8
 
chris2be8's Avatar
 
Sep 2009

5·389 Posts
Default

Does anyone have any perl code I could "borrow" to query factordb to see if a given number is factored? I'm finding quite a lot of the small composites I'm working on have been factored by someone else when I submit the factors. A check just before I start work should save wasted effort.

I could probably write some myself, but it will take time I'm short of.

Chris
chris2be8 is offline   Reply With Quote
Old 2012-05-01, 18:39   #9
Stargate38
 
Stargate38's Avatar
 
"Daniel Jackson"
May 2011
14285714285714285714

613 Posts
Default

Any number <65 digits is automatically factored by the DB.
Stargate38 is offline   Reply With Quote
Old 2012-05-03, 10:20   #10
yoyo
 
yoyo's Avatar
 
Oct 2006
Berlin, Germany

59110 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
Does anyone have any perl code I could "borrow" to query factordb to see if a given number is factored? I'm finding quite a lot of the small composites I'm working on have been factored by someone else when I submit the factors. A check just before I start work should save wasted effort.

I could probably write some myself, but it will take time I'm short of.

Chris
Start with this http://www.rechenkraft.net/wiki/inde...ctordb#yafu.pl. It fetches a small composite from factorDB, runs yafu with it and reports it back. This and the randomness which is used should avoid that you waste to much effort.

yoyo
yoyo is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
report not updating ??? nobody Information & Answers 3 2012-04-26 14:31
Updating GNFS parameters bchaffin Aliquot Sequences 6 2011-06-23 17:36
exponent not updating problem Nestea80 Information & Answers 3 2008-12-04 16:47
User information on WWW.NFSNET.ORG not updating xavion NFSNET Discussion 1 2003-10-12 04:32
Status Updating SatishM Software 4 2003-04-05 16:08

All times are UTC. The time now is 05:09.

Sun Nov 29 05:09:39 UTC 2020 up 80 days, 2:20, 3 users, load averages: 2.27, 2.00, 1.71

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.