![]() |
![]() |
#1 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
37·163 Posts |
![]()
I have done as much of a snfs factorization of 2^11-1=2047=23*89 as I can but have got stuck on the sqrt.
For the polynomials x^3-2 and x-16 I have a,b pairs which form a square: Code:
3,1 18,1 1,3 17,4 8,7 |
![]() |
![]() |
![]() |
#2 |
Tribal Bullet
Oct 2004
1101111000112 Posts |
![]()
For an example this size it's better to do the algebraic square root by brute force. First turn every relation (a,b) into a polynomial (a-b*x). Then multiply all these degree-1 polynomials together, producing a degree-5 polynomial. Now reduce that product modulo x^3-2, yielding a quadratic with somewhat big coefficients. (If the algebraic poly had a leading coefficient other than one, the numbers involved would be larger). A further step, that may or may not be necessary, is to multiply the result by the square of the derivative of x^3-2, again reducing mod x^3-2. That step is needed to prevent obscure problems with the algebraic square root not existing when you really need it to.
The resulting polynomial S is an element of the number field defined by x^3-2. The algebraic square root is some other quadratic polynomial, whose coefficients will be about half the size of those in S, that equals S when squared modulo x^3-2. If the coefficients of S are small then you can just try exhaustive search until you hit a quadratic that works (there are two solutions, one the negative of the other). Otherwise you have to use one of the more complex methods to get the square root here. Because of the way the algebraic polynomial was selected, setting x=16 for the square root polynomial and reducing modulo 2047 gives a number that is a square root mod 2047. Meanwhile, there's a rational square root required too; take x - 16 and set x = a/b; each relation (a,b) gives the factorization of a-16*b into primes; collect all the powers of each prime over all relations in the set (the powers should be even), then cut all the exponents in half and multiply together modulo 2047. The result is also a square root modulo 2047, but has a different value than the algebraic square root. That those numbers are different means gcd(rat_sqrt+alg_sqrt,2047) is a nontrivial factor of 2047 with probability ~2/3. It sounds so straightforward, but after you have nonmonic polynomials, free relations, and coefficients millions of digits long to deal with, you'll barely be able to recognize these steps :) PS: One other thing...your original dataset has to have an even number of relations, so you'll need to find another dependency. Did you also use quadratic characters and verify that you have a square over the algebraic factor base? PPS: There is a worked example here that is complete and only slightly larger than yours Last fiddled with by jasonp on 2010-09-18 at 19:06 |
![]() |
![]() |
![]() |
#3 |
Dec 2008
179 Posts |
![]() |
![]() |
![]() |
![]() |
#4 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
37×163 Posts |
![]()
Thanks Jason! Through the information you have provided and your link I should be able to work it out. I wish I had found that link earlier. I am busy a lot of today and it might take me a few days to work it out. I didn't use quadratic characters. I will have to do more sieving in order to get a square matrix including them. It might be time to convert my sieving(trial factoring actually) code from my TI-89T calculator to my computer.
![]() |
![]() |
![]() |
![]() |
#5 |
Tribal Bullet
Oct 2004
32×5×79 Posts |
![]()
Good question; the early NFS references say that it's required and never explain why. My guess is that the algebraic side is the product of a bunch of degree-1 polynomials, and a square root will not exist unless the degree of the product is even, i.e. you have an even number of relations.
|
![]() |
![]() |
![]() |
#6 | |||
"Gang aft agley"
Sep 2002
2·1,877 Posts |
![]()
Oops, I thought I had it figured out thusly:
Quote:
http://cado.gforge.inria.fr/workshop/abstracts.html#jp In A Self-Tuning Filtering Implementation for the Number Field Sieve (ahem, see author), one slide, in part, reads: Quote:
|
|||
![]() |
![]() |
![]() |
#7 |
Tribal Bullet
Oct 2004
32×5×79 Posts |
![]()
The part you quote is a different issue, it's the principle needed to make the linear algebra work in a field with only two elements. Random Poster was asking about the underlying math that was required once the linear algebra was finished.
|
![]() |
![]() |
![]() |
#8 |
Dec 2008
179 Posts |
![]()
That doesn't make sense; every product of an odd number of first-degree polynomials is a square modulo an infinite number of polynomials. Of course there could be some other reason why the number of relations has to be even, but I think it's more likely that an odd number works just as well.
|
![]() |
![]() |
![]() |
#9 |
Tribal Bullet
Oct 2004
67438 Posts |
![]()
Actually, looking it up I think we're both right (though it's not for the reason above). If
- the algebraic polynomial (of degree d) has a leading coefficient A_d > 1 - the rational polynomial has a leading coefficient R_1 > 1 then you have to multiply rat_sqrt by A_d^(d-2+S/2) mod N and multiply alg_sqrt by R_1^(S/2) mod N, where S is the number of relations in the dependency (if you use free relations, the exponent in the first term has the number of free relations in the dependency subtracted out...it sucked having to figure that out myself). S odd is not allowed in that case, but when both leading coefficients are 1 then you can have an odd number of relations in the dependency. Last fiddled with by jasonp on 2010-09-20 at 12:00 |
![]() |
![]() |
![]() |
#10 |
Dec 2008
17910 Posts |
![]() |
![]() |
![]() |
![]() |
#11 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
37×163 Posts |
![]()
My siever is rewritten for my pc but still need to add quadratic characters. I am really finding time along with energy hard to find currently. Too much school work!!
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Second-hand CPU vs brand new GPU | fivemack | GPU Computing | 12 | 2017-01-11 23:05 |
Quadratic Sieve by Hand | Sam Kennedy | Factoring | 20 | 2013-01-09 16:50 |
127*Sqrt(62) | XYYXF | Math | 2 | 2007-12-08 12:31 |
Zeta function by hand | Damian | Math | 0 | 2006-07-27 14:43 |
P(n+1)<(sqrt(P(n))+1)^2 | Crook | Math | 3 | 2005-10-26 21:29 |