Code for the MeetupJS presentation
Four scripts are contained in this repository:
- Three JavaScript files
- One R script
These four files were created for fun and a presentation was later prepared for Argentina's MeetupJS. All these files calculate coincidental birthdays in a group of N persons using the Monte Carlo method. The calculation is not limited to "at least 2 coincidences", the minimum number of coincidences is set as a parameter and can be changed.
The JavaScript files are:
- a 4 years old code (with ~30 lines of code)
- a new approach in ~5 lines of code
- a revision to the 4 years old code (that performs better than the other two)
The R script mimics the logic of the JS file with the new approach.