Results 1 to 7 of 7

Thread: Birthdays

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Location
    Guildford, UK
    Posts
    91

    Birthdays

    Yeah well someone reminded me that I never did find out the solution to that birthday's problem:

    How many people do you have to stick into a cage before it's guaranteed that two have the same birthday (and that's birthday every year not just the year they were born)?

    My reasoning:

    Given n people in the cage, there are nC2 different pairs that you can make. Given a pair of people the probability they share a birthday is 1/3652 = 1/133225. So if P is the probability that two people in the cage share a birthday,

    P = nC2 / 133225

    But P >= 1 so:

    133225 >= nC2

    266450 >= n(n - 1)

    n2 - n - 266450 <= 0

    This gives n >= 516.7

    So n = 517 people.

    I'm not pretending to know the flaw there (i.e. I'm not asking ppl this just for kicks), and I would genuinely like to know what it is...

    Oh yeah and if you don't know what you're talking about (like you think a probability can be greater than 1, or don't understand why if A and B aren't independant P(A) * P(B) = P(A & B) is bollocks), please don't bother wasting our (the people who do or want to) time.

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    are all the people born in the same year? If not then maths cannot solve this without limiting the maximum age of people and without assigning a curve to fit the population (eg normal distribution). This would make it all too dificult so I presume they are all from the same year.

    In that case, your answer cant be right. Even if it is a leap year with 366 days, with 517 people you are bound to have at least 151 people with the same birthday.

    I haven't worked anything out yet, but at a gues to answer it 240 people. (almost totally random guessing.)

    edit: sorry, I now see you knew that was wrong yourself.
    Have I helped you? Please Rate my posts.

  3. #3

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Re: Birthdays

    Originally posted by TheManWhoCan
    Yeah well someone reminded me that I never did find out the solution to that birthday's problem:

    How many people do you have to stick into a cage before it's guaranteed that two have the same birthday (and that's birthday every year not just the year they were born)?

    My reasoning:

    Given n people in the cage, there are nC2 different pairs that you can make.
    Yes
    Given a pair of people the probability they share a birthday is 1/3652 = 1/133225. So if P is the probability that two people in the cage share a birthday,
    No, 1/365, as they do not have to coinside at a specific day, but any day
    P = nC2 / 133225
    I don't understand.. explain?
    But P >= 1 so:

    133225 >= nC2

    266450 >= n(n - 1)

    n2 - n - 266450 <= 0

    This gives n >= 516.7

    So n = 517 people.

    I'm not pretending to know the flaw there (i.e. I'm not asking ppl this just for kicks), and I would genuinely like to know what it is...

    Oh yeah and if you don't know what you're talking about (like you think a probability can be greater than 1, or don't understand why if A and B aren't independant P(A) * P(B) = P(A & B) is bollocks), please don't bother wasting our (the people who do or want to) time.
    Here's my reasoning,
    1/365 that two birthdays will coinside, therefore 364/365 that they wont. That three birthdays will not coinside does not depend on more than that two of them will coinside and that the third will not coinside with the two others, etc..
    364/365*363/365... (366-n)*365= 0 when n=366 so the birthdays will coinsidense for certain when n>=366
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking AAARGGG!!!

    517...153...240.....all these numbers....

    You want to be *guarenteed* two share the same birthday, you need 367. Cos what if the first 366 ppl you choose have birthdays on 1st Jan, 2nd Jan,....29th Feb....30th Dec, 31st Dec.

    Now, the chance of this is small, but still possible (even if a 'double' can't store it, its still > 0)
    So, you need at least 367 people. With these, (by the pigeon-hole-principle) you are guarenteed, 100% certain, that two people somewhere in the group will share a birthday.



    BTW: the probability of two people sharing a birthday is 1/366, not 1/3662
    sql_lall

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Oct 2003
    Location
    Guildford, UK
    Posts
    91
    Yeah that seems to be right, 367 it is!

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    yeah except for that you wanted to have birthdays that happen every year
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width