Birthday Simulator
This was a tough one. I spent hours trying to figure out the logic of this program, which is
basically to assign a requested number of people a random birthday and see if there are any matches.
The inspiration for that was the birthday paradox. You'd think that there would have to be at least 365 people for any birthday matches
to occur, but the chances are at 50% already with only 23 people!*. And it's pretty much 100% with the double of that many people.
Weird, isn't it? Well, it turns out that our perception is like that because we are selfish. We always think of the birthday
match to ourselves, but never with the rest of the room. The chances increase exponentiolly as the number of people
in that room increase. I realised that while coding because the logic algorithm has to compare everyone with everyone else.
To calculate the probability, I used this formula from the thorough
Wikipedia description of the problem.
To understand it better, I also watched Kevin's "Vsauce2" video
that elegantly explains the paradox.
You can access the application's Github repository by clicking here.