by Fuzzy » Wed Nov 11, 2009 11:23 pm
You are wrong about the birthdays. In a room of 356 people, there is a very huge chance that two people will share a birthday.
The first person has one day out of 365 or 1/365.
Now for the second person to have a different birthday, they can only have a birthday on 1 out of 354 remaining days.
Third, 1/353 (because they cannot share with the other two..)
So by the halfway point, 183rd person, there are only 182 days free that dont have another birthday person. That is about 50% chance that they DO have someone elses birthday.
By the last person, 354 birthdays are taken! They only have a 1/365 chance of having their own birthday.
Chances are, more than two people have the same birthday. QED.
Remember than when you are using rand().
Mortal Enemy of IF....THEN(and Inspector Gadget)
Still ThreeFingerPete to tekdino