Skip to content

EladMoshe98/Card-Shuffling-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Card Shuffling Analysis

Mathematical analysis of collision probability and shuffle sufficiency in the riffle shuffle — a project for the Advanced Algorithms & Combinatorics course in my CS Master's at IE Business School.

Topics Covered

  • Riffle shuffle model – Gilbert-Shannon-Reeds (GSR) formulation
  • Collision probability – how likely two cards end up adjacent after k shuffles
  • Shuffle sufficiency – the minimum number of riffle shuffles needed to achieve near-uniform randomness (the classic "7 shuffles" result)
  • Theoretical derivations with empirical validation

Structure

├── analysis.ipynb   # Main notebook with proofs and experiments
├── report.pdf       # Written report submitted for the course
└── utils.py         # Shuffle simulation helpers

Running the Notebook

pip install numpy matplotlib jupyter
jupyter notebook analysis.ipynb

About

Collision and Shuffle Sufficiency in Riffle Shuffle. A math and advanced algorithms project for my CS Master's course on combinatorics.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages