Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The birthday paradox says that the probability that two people in a room will ha

ID: 3648474 • Letter: T

Question

The birthday paradox says that the probability that two people in a room will have the same birthday is more that half as long as the number of people in the room (n), is more than 23. This property is not really a paradox, but many people find it surprising. design a c++ 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. You should run at least 10 experiments for each value of n and it should output, for each n, the number of experiments for that n, such that two people in that test have the same birthday.







Explanation / Answer

#include #include #define PEOPLE_SIZE 23 #define TRIAL_SIZE 10000 int main(){ int i,j,k,count, people[PEOPLE_SIZE]; count=0; for (k=0;k

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote