Data Structures and Algorithms in Java™

Data Structures And Algorithms In Java™

Authors: Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser
ISBN: 9781118771334
Edition: 6
Chapter: Java Primer
Exercise: Exercises
Question: 29

 

Question by Samuel on 04 May, 2019 at 07:21 AM

The birthday paradox says that the probability that two people in a room will have the same birthday is more than half, provided n, the number of people in the room, is more than 23. This property is not really a paradox, but many people find it surprising. Design a Java program that can test this paradox by a series of experiments on randomly generated birthdays, which test this paradox for n = 5,10,15,20, . . . ,100.

Extend your hand to students and help them to get better grades.