wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> hard >> HARD: BIRTHDAY LINE
(Message started by: S. Owen on Aug 14th, 2002, 7:15am)

Title: HARD: BIRTHDAY LINE
Post by S. Owen on Aug 14th, 2002, 7:15am
Is there a more elegant way to analyze this?

Your probability of getting a free ticket when you are the nth person is line is:

(probability that none of the first n-1 people share a birthday) * (probability that you share a birthday with one of the first n-1 people)

(1 * 364/365 * 363/365 * ... * (365-(n-2))/365) * ((n-1)/365)

Fire up that computer and you'll find that this is maximized for n = 15.

Title: Re: HARD: BIRTHDAY LINE
Post by Tingx on Aug 30th, 2002, 11:59am
Hey Owen!
Did what you did, and arrived at the same expression for P(n)...

Continued like this, we want least n such that P(n) > P(n+1), so get (after some simplifying)
n2+n-365 > 0
(n-18.6)(n+19.6) > 0
Inequality is satisfied in the regions
n > 18.6 or n < -19.6 (rejected)
So, n = 19.

Did not have time to check the working, but idea seems right to me, but answer different from yours.  :(

Cheers, Tingx

Title: Re: HARD: BIRTHDAY LINE
Post by Tingx on Aug 30th, 2002, 12:25pm

oops...should be like this....

n2-n-365 > 0
(n+18.6)(n-19.6) > 0
Inequality is satisfied in the regions
n > 19.6 or n < -18.6 (rejected)
So, n = 20.

Title: Re: HARD: BIRTHDAY LINE
Post by S. Owen on Sep 2nd, 2002, 8:07pm
You are right - I ran the numbers again and got 20! I'm not sure what I did wrong the first time. Thanks for pointing out an easier way to solve it.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board