At a movie theater, the manager announces that they will give a free ticket to the first person in line whose birthday is the same as someone who has already bought a ticket. You have the option of getting in line at any time. Assuming that you don't know anyone else's birthday, that birthdays are distributed randomly throughout the year, etc., what position in line gives you the greatest chance of being the first duplicate birthday?
from http://www.ocf.berkeley.edu/~wwu/riddles/hard.shtml
(In reply to
re: Function by Richard)
I'm not really following what you're saying, and I'm a little confused right now.
I had the vague idea while I was writing the function that I was missing something. I was thinking that I was factoring in a several related probabilities when I really should have considered them together... or something like that. Anyway, my function needs revising, and I'm not really sure I can do it at the moment.
Basically, my function was this:
chance of having a dupe birthday * chance of no one before in line having a dupe birthday
Right now I'm thinking that the chance of having a dupe birthday should assume that everyone has a different birthday... since if people have the same birthday, than you already lost.
Before, it was 1-((r-1)/r)^(n-1), where r is the number of days in a year, and n is the # person in line. It should be more like (n-1)/r.
The chance of no previous person having a dupe birthday also needs changing, but I'm not sure how to do it.
Right now I'm having that same vague feeling that I'm off on the calculations...
Thank you for checking my work.
|
Posted by Tristan
on 2004-04-04 18:06:38 |