找到同生日的人
30: Finding Your Birthmate
题目详情
你想找到一个与你生日相同的人。最少需要问多少个陌生人的生日,才能有 50% 的概率至少遇到一个与你同生日的人?(忽略闰年,假设一年 365 天等可能)
You want to find someone whose birthday matches yours.
What is the least number of strangers whose birthdays you need to ask about to have a 50–50 chance?
解析
任一陌生人生日不等于你的概率为 。
问 个人都不等于你的概率为 。
要求至少 50% 概率“有人等于你”,即
解得 ,因此至少问 253 人。
Original Explanation
The probability that a randomly chosen stranger does not share your birthday is:
The probability that strangers all do not share your birthday is:
To have at least a 50% chance of finding someone who does share your birthday, solve for the smallest such that:
Taking logarithms:
Solving gives:
Answer:
You need to ask at least 253 people to have a 50-50 chance that one of them shares your birthday.