Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a football or soccer game, you have 22 players, from both teams, in the field. What is the probability of having any two players

In a football or soccer game, you have 22 players, from both teams, in the field. What is the probability of having any two players with the same birthday? (just assume 365 days a year and dont have to do the exact calendar month and day, use the day number from 1 to 365)

Write a program to simulate the birthday for each player per iteration and then tabulate the results in terms of occurrence of same birthdays over number of iterations. Do cases of 10, 50, 100 and 500 iterations, or more. The larger the number of iterations (samples), the closer the result is to the theoretical probability. What do you call this theory, or law? ( Ive already given two-third of the name in the last sentence and question)

Hints:

The problem statement implies you need to do a match-search after generating the birthdays; and then do the booking keeping of the results for all iterations. Good opportunity to apply "arrays". And, before running it using srand() and rand() to generate the birthdays, put your fixed data there to verify the search, book keeping and data output algorithms first.

All prior documentation and code structure requirements also apply to this project.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are the three formal responsibilities of a board of directors?

Answered: 1 week ago

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago

Question

4. Design a career management system.

Answered: 1 week ago

Question

4. Evaluation is ongoing and used to improve the system.

Answered: 1 week ago