How sxhnd/pythonprojects works
Birthday Problem is a small interactive command-line tool that compares a Monte Carlo estimate of shared-birthday probability with an exact calculation. Its workflow accepts a room size, runs the simulation, reports both probabilities, optionally prints a comparison table, and reports the theoretical 50% threshold. The single source file implements all behavior; the graph separates its meaningful calculation and reporting stages. Relationships are based on the excerpted source.
Main entry points: birthday_problem.py Interactive CLI
Components 7
Other components
- User
- Interactive CLI
BirthdayProblem/birthday_problem.py - Monte Carlo
BirthdayProblem/birthday_problem.py - Birthday Trial
BirthdayProblem/birthday_problem.py - Exact Probability
BirthdayProblem/birthday_problem.py - Comparison Table
BirthdayProblem/birthday_problem.py - Threshold Search
BirthdayProblem/birthday_problem.py
Connections 9
- User → Interactive CLI: enters room size
BirthdayProblem/birthday_problem.py - Interactive CLI → Monte Carlo: runs estimate
BirthdayProblem/birthday_problem.py - Monte Carlo → Birthday Trial: repeats trial
BirthdayProblem/birthday_problem.py - Interactive CLI → Exact Probability: calculates probability
BirthdayProblem/birthday_problem.py - Interactive CLI → Comparison Table: optionally displays
BirthdayProblem/birthday_problem.py - Comparison Table → Monte Carlo: estimates each size
BirthdayProblem/birthday_problem.py - Comparison Table → Exact Probability: calculates each size
BirthdayProblem/birthday_problem.py - Interactive CLI → Threshold Search: finds crossing
BirthdayProblem/birthday_problem.py - Interactive CLI → User: prints results
BirthdayProblem/birthday_problem.py