Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 1.13 KB

File metadata and controls

11 lines (8 loc) · 1.13 KB

Pollard's Rho Algorithm: Implementation & Statistical Analysis

This repository contains an implementation of Pollard's Rho algorithm for prime factorization, alongside a comprehensive theoretical and empirical analysis. The project explores the algorithm's performance through the lens of the Birthday Paradox and Floyd's cycle-finding algorithm.

By running extensive empirical simulations, this project validates the $O(n^{1/4})$ asymptotic bound for expected partial collisions and analyzes the variance of random walks compared to theoretical truly-random functions.

Key Highlights

  • Algorithm Implementation: Efficiently finds non-trivial prime factors of composite numbers using pseudo-random walks.
  • Cycle Detection: Utilizes Floyd's "tortoise and hare" cycle-finding approach to detect collisions with $O(1)$ space complexity.
  • Empirical Validation: Includes large-scale simulations generating 10-digit prime factors to test collision times and statistical variance.
  • Statistical Analysis: Compares empirical results against theoretical models, proving the robustness of the pseudo-random heuristic ($f(x) = x^2 + 1$).