| Algorithm | Source Code | Pseudo-Code | Running Time |
|---|---|---|---|
| Trial Division | C++ | $O({n}^{1/2})$ | |
| Fermat Method | C++ | [1, page 226] | between $O({n}^{1/2})$ and $O(n)$ depending on the distance between prime factors |
| Pollard Rho Method | C++ | [1, page 230] | $O({n}^{1/4})$ (heuristic) |
| Dr. Hiary's Method 2 | C++(basic), C++(optimal), Mathematica3 | [3, page 2] | ${n}^{1/3+o(1)}$ |
| Algorithm | Source Code | Pseudo-Code | Running Time |
|---|---|---|---|
| Naive Algorithm | C++ | $O(p)$ | |
| Baby Step Giant Steps | C++ | [1, page 235] | $O({p}^{1/2})$ |
| Pollard Rho Method | C++ | [1, page 232] | $O({p}^{1/4})$ (heuristic) |
[1] Crandall, Richard E, and Carl Pomerance. Prime Numbers: A Computational Perspective. New York, NY: Springer, 2005. Internet resource.
[2] Gathen, Joachim , and Jürgen Gerhard. Modern Computer Algebra. Cambridge: Cambridge University Press, 1999. Print.
[3] Hiary, Ghaith A. A Deterministic Algorithm for Integer Factorization. Mathematics of Computation. 85.300 (2016). Print.