Skip to content

Commit 6fda4d5

Browse files
committed
Add Wikipedia reference and remove unused imports
- Added Wikipedia URL for Pollard's rho algorithm for logarithms - Removed unused Tuple import - All doctests and unit tests pass
1 parent 22bb965 commit 6fda4d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

maths/pollard_rho_discrete_log.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional, Tuple
1+
from typing import Optional
22
import math
33
import random
44

@@ -11,6 +11,8 @@ def pollards_rho_discrete_log(g: int, h: int, p: int) -> Optional[int]:
1111
This is a probabilistic algorithm that finds discrete logarithms in O(√p) time.
1212
The algorithm may not always find a solution in a single run due to its
1313
probabilistic nature, but it will find the correct answer when it succeeds.
14+
15+
More info: https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm_for_logarithms
1416
1517
Parameters
1618
----------

0 commit comments

Comments
 (0)