mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Math (https://www.mersenneforum.org/forumdisplay.php?f=8)
-   -   prime factorization algorithms? (https://www.mersenneforum.org/showthread.php?t=14803)

cheesehead 2011-01-19 02:52

[QUOTE=science_man_88;246891]is [URL]http://en.wikipedia.org/wiki/Factor_base[/URL] a good source ? If so I partially understand but not to a level that I could help yet.[/QUOTE]Let's not forget that MathWorld (formerly Eric Weisstein's World of Mathematics, now at [URL]http://mathworld.wolfram.com/[/URL] ) is a good source of concise definitions, though it doesn't go into history and such.

MathBoy 2011-01-21 20:04

well, I have been looking at the Wikipedia , and Mathworld definitions but still don't fully think I understand it.

definition of a factor bases:
The primes with Legendre symbol (n/p)=1 (less than pi(d) for trial divisor d) which need be considered when using the quadratic sieve factorization method

Question
From this definition how do you know what d should be so that you can find a nontrivial square congruence relation for n? (i.e x^2 = y^2 mod n)


From this definition it seems that a factor bases is just a set of prime numbers under a randomly chosen pi(d) such that n is a quadratic residue mod all those primes in that set.

sorry if I am not getting the obvious.

CRGreathouse 2011-01-21 20:07

[QUOTE=MathBoy;248003]From this definition how do you know what d should be so that you can find a nontrivial square congruence relation for n?[/QUOTE]

Choose whatever you like. If it works, you find a factor; if it fails, choose a larger d and start over.

There are tables and heuristics and data to help you choose a number large enough without being so large that it's slow.

[QUOTE=MathBoy;248003]From this definition it seems that a factor bases is just a set of prime numbers under a randomly chosen pi(d) such that n is a quadratic residue mod all those primes in that set.[/QUOTE]

Right. Depending on what method you use, it's either easy to build the factor base or entirely trivial.

davar55 2011-01-21 20:13

[QUOTE=R.D. Silverman;246620]For general algorithms yes. But ECM is better at factoring when
factors are relatively small.
[/QUOTE]

Is that so? Could you please quantify this claim?

MathBoy 2011-01-21 20:19

[QUOTE]Choose whatever you like. If it works, you find a factor; if it fails, choose a larger d and start over.

There are tables and heuristics and data to help you choose a number large enough without being so large that it's slow.[/QUOTE]

So the QS , GNFS , and their variants
Won't give you any factors provided you don't choose d high enough / correctly?
If this is true then these methods really don't guarantee you a factor necessarily only if their is a guaranteed way to find d such that a nontrivial relation holds in your factor bases and you can reasonable calculate the factor bases set.

Correct me if I am wrong

CRGreathouse 2011-01-21 20:58

[QUOTE=MathBoy;248011]So the QS , GNFS , and their variants
Won't give you any factors provided you don't choose d high enough / correctly?[/QUOTE]

Only insofar as trial division won't give you a factor if you don't go high enough.

With trial division, you know that there is a factor to find if you search long enough. With, e.g., QS you know that there are enough relations if you search long enough. It would be easy to come up with a value that would be guaranteed high enough to work in all cases, but it's much better to choose a good value rather than a worst-case value. (In practice, you never change the size of the factor base; if the size was a little off you just sieve slightly longer than you'd otherwise sieve.)

MathBoy 2011-01-21 21:24

OK

But obtaining a factor bases would be equivalent to finding all primes that have the relation x^2 = n mod p in the set of numbers pi(d).

I would think this is still a long process to do and takes brute force.
Unless their is an easy way to compute if n is a quadratic residue mod a prime fast? And to compute it fast for all primes under pi(d). Either way won't this be equivalent to trial divisors for numbers up to pi(d) for runtime. Seems it to me.

Also is this definition of a factor bases for the QS the same for the GNFS , SNFS , RNFS ,...etc?
Or is their a different definition for each method?


Thank you for all your help in understanding this.

R.D. Silverman 2011-01-21 21:50

[QUOTE=MathBoy;248003]well, I have been looking at the Wikipedia , and Mathworld definitions but still don't fully think I understand it.

definition of a factor bases:
The primes with Legendre symbol (n/p)=1 (less than pi(d) for trial divisor d) which need be considered when using the quadratic sieve factorization method
[/QUOTE]

No. The part about "trial divisor d" is wrong.

We are discussing only QS here. The factor base is a set of primes
that are quadratic residues of the number being factored. The set consists
of all primes less than a specified bound B. This bound is an [i] input
parameter.[/i]

We use a quadratic polynomial Ax^2 + 2Bx + C whose discriminant
is a multiple k, of n. k is chosen to maximize the Knuth-Schroeppel
function.

READ my 1987 paper: The Multiple Polynomial Quadratic Sieve. Math. Comp.


[QUOTE]

From this definition it seems that a factor bases is just a set of prime numbers under a randomly chosen pi(d) such that n is a quadratic residue mod all those primes in that set.

[/QUOTE]

"under a randomly chosen pi(d)" is gibberish. The correct statement should
be "all primes less than a chosen bound B". [you also need the unit
-1 to hold the sign bit]

R.D. Silverman 2011-01-21 21:58

[QUOTE=MathBoy;248046]OK

But obtaining a factor bases would be equivalent to finding all primes that have the relation x^2 = n mod p in the set of numbers pi(d).
[/QUOTE]

This is more gibberish. You want all primes p < B, such that (p|n) = 1
[Legendre symbol]. This takes a few seconds at most for even fairly
large B [e.g. B = 10^7]
[QUOTE]

I would think this is still a long process to do and takes brute force.
Unless their is an easy way to compute if n is a quadratic residue mod a prime fast?
[/QUOTE]

Get hold of Crandall & Pomerance: Prime Numbers, A computational
perspective.

It is TRIVIAL to compute the Legendre symbol.

[QUOTE]
And to compute it fast for all primes under pi(d). Either way won't this be equivalent to trial divisors for numbers up to pi(d) for runtime. Seems it to me.
[/QUOTE]

"seems to me"???? You don't know enough to have an opinion.

You need to learn some basic number theory. Without it, understanding
these algorithms will be hopeless. Start by looking up "Quadratic Reciprocity"

And stop using the word "under". If you mean "less than", than say it!


[QUOTE]
Also is this definition of a factor bases for the QS the same for the GNFS , SNFS , RNFS ,...etc?
Or is their a different definition for each method?
[/QUOTE]

I already discussed this. Go back and read what I wrote.

R.D. Silverman 2011-01-21 22:03

[QUOTE=MathBoy;248011]So the QS , GNFS , and their variants
Won't give you any factors provided you don't choose d high enough / correctly?
If this is true then these methods really don't guarantee you a factor necessarily only if their is a guaranteed way to find d such that a nontrivial relation holds in your factor bases and you can reasonable calculate the factor bases set.

Correct me if I am wrong[/QUOTE]

Stop making guesses and go read my Math. Comp. paper. It explains
everything you need to know.

CRGreathouse 2011-01-22 03:40

[QUOTE=R.D. Silverman;248063]Stop making guesses and go read my Math. Comp. paper. It explains
everything you need to know.[/QUOTE]

Actually, he shouldn't -- it's not yet within his reach. He'll need to learn more before tackling that paper, and the forums are a passable place for that.


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

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