Question: Use Pollard s p 1 algorithm to try to factor n = 1 4 2 5 7 3 7 . Here is C - like

Use Pollards p 1 algorithm to try to factor n =1425737. Here is C-like pseudocode for this that does not require computations with numbers greater than n 2. n =1425737; a =2; B =20; b[1]= a; for (k=2;k B;k++){ for (j=1:j k;j++)/ loop is necessary to prevent overflow / b[k]= b[k]b[k-1] mod n ; d[k]= gcd(b[k]-1,n); if (d[k]>1 && d[k]< n){ print("factored at k =%d: p =%d",k,d[k]); break; }} Why did this algorithm terminate when it did?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!