To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Williams's p + 1 algorithm

From Wikipedia, the free encyclopedia

In computational number theory, Williams's p + 1 algorithm is an integer factorization algorithm, one of the family of algebraic-group factorisation algorithms. It was invented by Hugh C. Williams in 1982.

It works well if the number N to be factored contains one or more prime factors p such that p + 1 is smooth, i.e. p + 1 contains only small factors. It uses Lucas sequences to perform exponentiation in a quadratic field.

It is analogous to Pollard's p − 1 algorithm.

YouTube Encyclopedic

  • 1/3
    Views:
    1 419
    810
    2 855
  • Computational Complexity of Polynomial Time Problems: Introduction
  • Circuit Complexity and Connections I
  • Thinking Algorithmically About Impossibility

Transcription

Algorithm

Choose some integer A greater than 2 which characterizes the Lucas sequence:

where all operations are performed modulo N.

Then any odd prime p divides whenever M is a multiple of , where and is the Jacobi symbol.

We require that , that is, D should be a quadratic non-residue modulo p. But as we don't know p beforehand, more than one value of A may be required before finding a solution. If , this algorithm degenerates into a slow version of Pollard's p − 1 algorithm.

So, for different values of M we calculate , and when the result is not equal to 1 or to N, we have found a non-trivial factor of N.

The values of M used are successive factorials, and is the M-th value of the sequence characterized by .

To find the M-th element V of the sequence characterized by B, we proceed in a manner similar to left-to-right exponentiation:

x := B           
y := (B ^ 2 − 2) mod N     
for each bit of M to the right of the most significant bit do
    if the bit is 1 then
        x := (x × y − B) mod N 
        y := (y ^ 2 − 2) mod N 
    else
        y := (x × y − B) mod N 
        x := (x ^ 2 − 2) mod N 
V := x

Example

With N=112729 and A=5, successive values of are:

V1 of seq(5) = V1! of seq(5) = 5
V2 of seq(5) = V2! of seq(5) = 23
V3 of seq(23) = V3! of seq(5) = 12098
V4 of seq(12098) = V4! of seq(5) = 87680
V5 of seq(87680) = V5! of seq(5) = 53242
V6 of seq(53242) = V6! of seq(5) = 27666
V7 of seq(27666) = V7! of seq(5) = 110229.

At this point, gcd(110229-2,112729) = 139, so 139 is a non-trivial factor of 112729. Notice that p+1 = 140 = 22 × 5 × 7. The number 7! is the lowest factorial which is multiple of 140, so the proper factor 139 is found in this step.

Using another initial value, say A = 9, we get:

V1 of seq(9) = V1! of seq(9) = 9
V2 of seq(9) = V2! of seq(9) = 79
V3 of seq(79) = V3! of seq(9) = 41886
V4 of seq(41886) = V4! of seq(9) = 79378
V5 of seq(79378) = V5! of seq(9) = 1934
V6 of seq(1934) = V6! of seq(9) = 10582
V7 of seq(10582) = V7! of seq(9) = 84241
V8 of seq(84241) = V8! of seq(9) = 93973
V9 of seq(93973) = V9! of seq(9) = 91645.

At this point gcd(91645-2,112729) = 811, so 811 is a non-trivial factor of 112729. Notice that p−1 = 810 = 2 × 5 × 34. The number 9! is the lowest factorial which is multiple of 810, so the proper factor 811 is found in this step. The factor 139 is not found this time because p−1 = 138 = 2 × 3 × 23 which is not a divisor of 9!

As can be seen in these examples we do not know in advance whether the prime that will be found has a smooth p+1 or p−1.

Generalization

Based on Pollard's p − 1 and Williams's p+1 factoring algorithms, Eric Bach and Jeffrey Shallit developed techniques to factor n efficiently provided that it has a prime factor p such that any kth cyclotomic polynomial Φk(p) is smooth.[1] The first few cyclotomic polynomials are given by the sequence Φ1(p) = p−1, Φ2(p) = p+1, Φ3(p) = p2+p+1, and Φ4(p) = p2+1.

References

  1. ^ Bach, Eric; Shallit, Jeffrey (1989). "Factoring with Cyclotomic Polynomials" (PDF). Mathematics of Computation. American Mathematical Society. 52 (185): 201–219. doi:10.1090/S0025-5718-1989-0947467-1. JSTOR 2008664.

External links

This page was last edited on 30 September 2022, at 21:06
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.