mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Factoring

Reply
 
Thread Tools
Old 2013-11-13, 13:34   #177
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Default

Quote:
Originally Posted by YuL View Post
Thank you all for your help;

I lack the knowledge necessary to understand the various posts above especially
the one from Mr Silverman. I am just a software engineer who graduated in mathematics
more than 13 years ago, I wasn't even into number theory at that time.
BUT I'm willing to learn because I love mathematics and it is a lot a fun to factor big numbers.
Get hold of the following:

Hardy & Wright: Introduction to Number Theory
Crandall & Pomerance : Prime Numbers, a Computational Perspective
Knuth: TAOCP, VOl 2.

Read them from cover to cover. DO THE EXERCIZES. If you have trouble
with the text or exercizes, ASK. If you want additional references we
can provide them.

I assume that as part of your degree that you did take at least one
course in modern algebra and one in linear algebra and that you have some
mathematical maturity.

What is it that you don't understand about my post?
R.D. Silverman is offline   Reply With Quote
Old 2013-11-13, 22:13   #178
YuL
 
YuL's Avatar
 
Feb 2012
Paris, France

7×23 Posts
Default

I think we are going a little bit off topic.. anyway here is my answer.

Quote:
Originally Posted by R.D. Silverman View Post
...Crandall & Pomerance : Prime Numbers, a Computational Perspective...
I bought the second edition of that one two years ago, it is a fantastic book but I think it can hardly be considered as an introduction to the subject so I was going to get the Hardy & Wright soon.
Thanks for the references.

Quote:
Originally Posted by R.D. Silverman View Post
...
Read them from cover to cover. DO THE EXERCIZES. If you have trouble
with the text or exercizes, ASK.
I'll try.

Quote:
Originally Posted by R.D. Silverman View Post
I assume that as part of your degree that you did take at least one
course in modern algebra and one in linear algebra...
Yes I did.

Quote:
Originally Posted by R.D. Silverman View Post
...and that you have some mathematical maturity.
I hope so :)

Quote:
Originally Posted by R.D. Silverman View Post
What is it that you don't understand about my post?
What does it mean concretely to sieve "on one side"?
You wrote that you compute the actual factorizations of the smooth
relations via a re-sieve, does it mean that you relaunch the siever
on the same range?
You also wrote that you store the factors found during the re-sieve in a
hash table. I suppose you use a program to do so?
How do you know whether an overflow occurs when storing the factors in the hash-table?
YuL is offline   Reply With Quote
Old 2013-11-13, 23:48   #179
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Default

Quote:
Originally Posted by YuL View Post

What does it mean concretely to sieve "on one side"?
You wrote that you compute the actual factorizations of the smooth
relations via a re-sieve, does it mean that you relaunch the siever
on the same range?
You also wrote that you store the factors found during the re-sieve in a
hash table. I suppose you use a program to do so?
How do you know whether an overflow occurs when storing the factors in the hash-table?
Let's take this one piece at a time.

How much do you know about how NFS works? You need to gain a basic
understanding of what it does before we can have further discussion.

We have two fields: One is typically Q, another is Q(alpha) for some
alpha a root of an irreducible polynomial f. We also have an integer N
that we are trying to factor and a second polynomial g. f and g
share a common root M mod N, so there is a ring homomorphism phi from
alpha to M over Z/NZ. This yields a congruence (a + bM) =
(a + b phi(alpha)) mod N. Thus the congruence has "two sides"


We look for lattice points (a,b) such that
the norm of a + bM and the norm of a + b alpha are simultaneously smooth.
We sieve over (a,b) for one set of norms/polynomial, and over a sub-lattice of (a,b) for the other polynomial such that the norms in the sub-lattice are always divisible by the special q.

The siever isn't 'relaunched'. It is all one program. Once we find
points whose norm might be smooth, we need to reconstruct the factorization. This is partially done by running the sieve again, but
instead of adding log(p) to lattice locations, we store p itself
in a hash table.

If you do not know what a hash table is, or how it works you have
more reading to do. Read the Knuth volume (3?) that discusses it.

One gets a hash overflow when there isn't enough vacant space in the
table to store more primes.

An NFS siever is complicated. You might first want to learn how
QS works.
R.D. Silverman is offline   Reply With Quote
Old 2013-11-14, 01:36   #180
wblipp
 
wblipp's Avatar
 
"William"
May 2003
New Haven

2·7·132 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
Let's take this one piece at a time.
wblipp is offline   Reply With Quote
Old 2013-11-14, 05:28   #181
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

966410 Posts
Default

Quote:
Originally Posted by wblipp View Post
+1. (I like this new Mr. Silverman! ... )
LaurV is offline   Reply With Quote
Old 2013-11-14, 07:44   #182
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

26×151 Posts
Default

Quote:
Originally Posted by YuL View Post
so I was going to get the Hardy & Wright soon
I goth this link long ago, also by RDS's "recommendation" (don't wanna say a stronger word here, hehe). The book is very good, and the forth edition printed in '75 is already public domain. See the links on the left, where different e-reader versions are also available.

Quote:
What does it mean concretely to sieve "on one side"?
Like in "rational" versus "algebraic"?
LaurV is offline   Reply With Quote
Old 2013-11-14, 14:09   #183
YuL
 
YuL's Avatar
 
Feb 2012
Paris, France

7×23 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
...
An NFS siever is complicated. You might first want to learn how
QS works.
Thank you for your careful explanation. Regarding that last statement,
looking into the QS is what I was doing over the last few days mainly
by the reading the Crandall & Pomerance and I think I got the idea.

Quote:
Originally Posted by R.D. Silverman View Post
....so there is a ring homomorphism phi from
alpha to M over Z/NZ. This yields a congruence (a + bM) =
(a + b phi(alpha)) mod N. Thus the congruence has "two sides"
OK so now I got the explanation for the "sieving on the rational side" vs
"sieving on the algebraic side", it comes from the congruence
a + bM = (a + b phi(alpha)) mod N. I can directly map that to the
corresponding command line options in the GGNFS siever.

I know what an hash-table is but I don't see how it can overflow
I think it depends on the implementation.. If we temporarily
forget about the hash-table, is what you wrote equivalent
to setting a bound B on the number of primes obtained
by re-sieving and saying that an overflow occurs iff the
number of primes becomes >= B. If so, how is B computed?

Generally speaking I have a hard time finding the correspondence
between the theory and all those values in the poly file.
I've seen various posts were people talk about sieving on both sides
but AFAIK factmsieve.py(*) sieves only one side.

(*) Brian Gladman's python script I've been using for months
as a fire and forget tool for my factorizations.


Quote:
Originally Posted by LaurV View Post
I goth this link long ago, also by RDS's "recommendation" (don't wanna say a stronger word here, hehe). The book is very good, and the forth edition printed in '75 is already public domain. See the links on the left, where different e-reader versions are also available.
...
Thanks but I'm going to get the french translation (will be easier for me).
YuL is offline   Reply With Quote
Old 2013-11-14, 14:28   #184
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Default

Quote:
Originally Posted by YuL View Post
I know what an hash-table is but I don't see how it can overflow
I think it depends on the implementation..
huh? One allocates space for the table. If there are more primes
to store than space allows one gets an overflow. Why is this a
mystery? One can also get an "overflow" as the table starts to get full.
If a collision occurs it has to be resolved. There are a variety of ways
to do this. But once the table starts to get full one spends TOO MUCH
TIME resolving the *()!#&*@#&* collisions. It isn't worth it.

Yes. I could re-code to dynamically allocate more space for the table
as it starts to get full. I never thought it worth the effort.

Quote:
If we temporarily
forget about the hash-table, is what you wrote equivalent
to setting a bound B on the number of primes obtained
by re-sieving and saying that an overflow occurs iff the
number of primes becomes >= B. If so, how is B computed?
No.

Quote:
Generally speaking I have a hard time finding the correspondence
between the theory and all those values in the poly file.
I've seen various posts were people talk about sieving on both sides
but AFAIK factmsieve.py(*) sieves only one side.
No. It sieves both sides. It only applies the special-q value to one
side, but both sides get sieved.

Perhaps you might want to read "Development of the Number Field Sieve",
by Lenstra et.al.?
R.D. Silverman is offline   Reply With Quote
Old 2013-11-14, 14:29   #185
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

642410 Posts
Default

Quote:
Originally Posted by YuL View Post
I've seen various posts where people talk about sieving on both sides
but AFAIK factmsieve.py(*) sieves only one side.
This is an abuse of language: "sieve on the algebraic side" is being used there to mean "sieving using algebraic special-Q" (that is, doing some lattice manipulations so that you are looking only at X,Y where a given medium-sized prime Q is guaranteed to divide f_algebraic(X,Y) )

You have regardless to end up with X,Y where f_algebraic and f_rational are only divisible by moderately-sized primes.
fivemack is offline   Reply With Quote
Old 2013-11-14, 14:45   #186
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3×1,181 Posts
Default

Regarding the confusion about using hashtables: Sieving in NFS requires finding places where the values of two polynomials are simultaneously divisible by small factors. The goal is never to find all such places but to maximize the number of such places found per unit time. All those sieving parameters are there to set up approximations that reduce the work in return for missing a few 'hits' that we would otherwise find.

Hits are expected to be rare. Rather than evaluating the sieve for both polynomials simultaneously, we can evaluate one sieve, remember any (approximate) hits found, and then evaluate the other sieve at only those locations. Another possibility is to run both sieves but not bother to remember the list of primes dividing each hit. Then for simultaneous hits in both sieves we can go back and reconstruct the list of primes later. These techniques both benefit from using hashtables; putting too many hits in the hashtable is not impossible, but it does mean the approximations used are too loose and you will spend too much time sorting usable hits from unusable ones. This is the 'overflow' condition Bob refers to.
jasonp is offline   Reply With Quote
Old 2013-11-14, 18:33   #187
jcrombie
 
jcrombie's Avatar
 
"Jonathan"
Jul 2010
In a tangled web...

21510 Posts
Default

Quote:
Originally Posted by YuL View Post
What does it mean concretely to sieve "on one side"?
You can sieve on two sides -- the 'algebraic' side and the 'rational' side. If your .poly file has "type: snfs" then the factMsieve.pl script will sieve on the 'rational' side. If your .poly file has "type: gnfs" then it sieves on the 'algebraic' side. I believe the .py script is just a straight port from the perl script, so this should also apply there.

For the parameters, you'll notice that about half end in "r" and half end in "a". The "r" ones apply to the 'rational' sieving and the "a" ones apply to the 'algebraic' sieving.

Concretely, if you are manually calling the siever or modifying the scripts, you will have know that the "-a" parameter is for specifying 'algebraic' sieving and "-r" for 'rational' sieving.

Hope that helps a bit.

For what that means mathematically, you will have to listen RDS, Fivemack, jasonp, etc.
jcrombie is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vanishing Fermat Quotients and Brent's List Zeta-Flux Factoring 74 2010-04-07 22:03
Brent-Suyama extension of P-1 factoring S485122 Math 1 2009-08-23 15:21
Brent-Montgomery-te Riele numbers FactorEyes Factoring 23 2008-02-22 00:36
brent suyama extension in P-1 bsquared Factoring 9 2007-05-18 19:24
Brent's p-1 - How to deal with memory problems? jhillenb Factoring 4 2005-01-11 23:50

All times are UTC. The time now is 23:28.


Fri Aug 6 23:28:49 UTC 2021 up 14 days, 17:57, 1 user, load averages: 3.28, 3.77, 3.93

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.