返回题库

生日放假:最大化期望工日

Birthday Holidays

专题
Probability / 概率
难度
L4

题目详情

Labor laws in Erewhon require factory owners to give every worker a holiday whenever one of them has a birthday and to hire without discrimination on grounds of birthdays. Except for these holidays they work a 365- day year. The owners want to maximize the expected total number of mandays worked per year in a factory. How many workers do factories have in Erewhon?

解析

设工厂雇佣 nn 人,生日独立均匀分布在 365 天。

某天为“工作日”当且仅当没人生日在这天,其概率为

(364365)n.\left(\frac{364}{365}\right)^n.

因此期望工作天数为 365(364365)n365\left(\frac{364}{365}\right)^n,期望“工日数”(man-days)为

F(n)=n365(364365)n.F(n)=n\cdot 365\left(\frac{364}{365}\right)^n.

忽略整数约束,把 a=364365a=\frac{364}{365},最大化 nann a^n

ddnln(nan)=1n+lna=0n=1lna.\frac{d}{dn}\ln(n a^n)=\frac{1}{n}+\ln a=0 \Rightarrow n^*= -\frac{1}{\ln a}.

由于 ln(364365)1365\ln\left(\frac{364}{365}\right)\approx -\frac{1}{365},得到

n365.\boxed{n\approx 365}.

取整数时最优在 364 或 365 附近。