Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pollard's rho algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example factorization == Let <math>n = 8051</math> and <math>g(x) = (x^2 + 1) \bmod 8051</math>. [[File:Rho-example-animated.gif|thumb|348x348px|Pollard's rho algorithm example factorization for <math>n=253</math> and <math>g(x)=x^2 \bmod 253</math>, with starting value 2. The example is using [[Floyd's cycle-finding algorithm]].]] {| class="wikitable" style="text-align:right" ! width=30 | {{mvar|i}} || width=60 | {{mvar|x}} || width=60 | {{mvar|y}} || {{math|gcd({{abs|''x'' β ''y''}}, 8051)}} |- | 1 || 5 || 26 || 1 |- | 2 || 26 || 7474 || 1 |- | 3 || 677 || 871 || 97 |- | 4 || 7474 || 1481 || 1 |} Now 97 is a non-trivial factor of 8051. Starting values other than {{math|1=''x'' = ''y'' = 2}} may give the cofactor (83) instead of 97. One extra iteration is shown above to make it clear that {{mvar|y}} moves twice as fast as {{mvar|x}}. Note that even after a repetition, the GCD can return to 1.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)