News for hackers. Stuff that matters.
Re:Stephen Hawking 'very ill' by pierrefar on Monday April 20, 2009 @12:48PM (#570985)
Very true. In a group of 23 randomly selected people, there is just over 50% chance that two share the same birthday. Two great articles about this:

http://en.wikipedia.org/wiki/Birthday_paradox

http://mathforum.org/dr.math/faq/faq.birthdayprob.html

Don't tell that to astrologers, otherwise they might make Mars align with Jupiter and that will crash your code with an unknown exception.

Re:Stephen Hawking 'very ill' by param on Monday April 20, 2009 @03:07PM (#571200)
The funniest example of how that's just probability was when this problem was discussed in my bachelor's class of about 60 people, and the prof confidently starts asking us for our dates of birth, and there was not even 1 matching pair. The probability is apparently around .01%
Re:Stephen Hawking 'very ill' by swillden on Monday April 20, 2009 @03:16PM (#571215)
365! / ((365-60)! 365^60) = 0.0059

So it's about 1%, assuming uniform distribution of birthdays. Since they're not quite uniformly distributed, the actual odds of 60 people with no common birthdays is a little lower than that.

However, given the thousands of people reading HN who experienced such a classroom exercise, the odds are very good that someone like you will pipe up ;-)

Re:Stephen Hawking 'very ill' by paulgb on Monday April 20, 2009 @09:07PM (#571730)
Out of curiosity, how did the class determine whether anyone shared a birthday? The best way I can think of is lining up by order and then seeing if your neighbors share your birthday. Is that how you did it? Is there a better way to do it?
Re:Stephen Hawking 'very ill' by param on Tuesday April 21, 2009 @02:10AM (#571990)
everyone says out their birthday in order of seating(randomly seated). If someone hears their birthday, they shout out of turn.

I guess you were expecting an algorithm faster than O(n)? That was the best we could do, given n processors with O(1) space each :-D

Re:Stephen Hawking 'very ill' by jonknee on Monday April 20, 2009 @05:25PM (#571424)
We discussed this in an Algebra class during highschool--she actually sat us by birthdate. Turns out two people shared my birthday and she made us take out our IDs because she thought it was some sort of ruse. 10% of the class with the same birthday is a bit odd, but we all had fun calculating the actual odds.
Re:Stephen Hawking 'very ill' by delano on Monday April 20, 2009 @12:56PM (#571006)
An astrologer may also tell you the moon is in void of course and to wait until tomorrow to make your release :]