Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I really need help please, a c++ progam In a football or soccer game, you have 22 players, from both teams, in the field. What

I really need help please, a c++ progam

In a football or soccer game, you have 22 players, from both teams, in the field. What is the probability of having at least any two players with the same birthdays? (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, first, simulate the birthdays for each of the players per iteration for a specified number of iterations. For each iteration, look for and record the occurrence of same birthdays. Finally, after all the iterations are completed, produce the results as a ratio of occurrence of same birthdays(from at least two players) over the number of iterations.

Run your program for cases of 10, 50, 100, 500 and 5000 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)

Pointers:

For approach #1, you are free to do your research and study from any source, but do your own work. Please submit a .docx or .txt file with your derivation and discussion.

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"'.

Before using srand() and rand() to generate the birthdays, just typing in a set of fixed data into the birthday array to verify your algorithms for the search, book keeping and data output 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 Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

6 If f(x)=x' find f(x+h)-f(x) and simplify. f(x + h)-f(x) =

Answered: 1 week ago

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago