ZawHtinECE257 Quiz 4

# ZawHtinECE257 Quiz 4 - ECE257 Quiz 4 Date Monday week 10...

This preview shows pages 1–2. Sign up to view the full content.

ECE257 Quiz 4 Date: 3/10/08, Monday, week 10 Due Date: 3/12/08, Wednesday, week 10 Total Points: 120 points Total Grade Points: 3 grade points 1. (50%) Birthday Probability In the textbook, exercise 5.24 states the birthday problem about the probability of two or more people have the same birthday in a group of n people. The solution is posted in the distribution folder. As I showed you in my ECE114 Final Practice Questions in 2002, reproduced here below of writing a C program to compute such probability: From the theory of probability, we know that such probability (consider ordinary year with 365 days) is equal to 1 - P (365, 20) / 365 20 . Here P (365, 20) is the number of permutations of choosing 20 from 365 or 365! / (345!), where 365! Is 365 factorial or 365 * 364 * 363 * 362 * ,.. * 3 * 2 * 1. Prove this statement is correct or invalidate this by computing such a number (using C programming) (hint: compute (365.0 / 365. 0) * (364.0 / 365.0) * (363.0 / 365.0) * … * (346.0 / 365.0), which is a for loop of 20 iterations, for i = 1 to 20). Generalize this question to compute the probability of n people with 2 of them having the same birth date. Print out in tabular format, such probability for n = 11, 12, up to n = 50, listing 5 in a row if possible.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern