Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

C++

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)

Please use two approaches to solve the problem.

One, find the closed form mathematical solution by probability theory. Show your derivation/proof. This require some research of your own.

Two, 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:

For approach #1, you are free to do your research and study from the web, or any source, but do your own work.

For approach #2, 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

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

=+v3. Determine if they are targeting the same audience.

Answered: 1 week ago

Question

=+1. Compare the copy on both sites. Are they alike or distinctive?

Answered: 1 week ago

Question

=+What kind of clients would work well in this medium?

Answered: 1 week ago