返回题库

取错外套:轮数的期望与方差

n coats

专题
Algorithmic Programming / 算法编程
难度
L4

题目详情

There are nn coats in a coat check room, belonging to nn people, who make an attempt to leave by picking a coat at random. Those who pick their own coat leave, the rest return the coats and try again. Let NN be the number of rounds of attempts until everyone has left. Show that E[N]=n\mathbb{E}[N] = n and var(N)=n\operatorname {var}(N) = n .

解析

设第 kk 轮结束后剩余外套数为 RkR_k,停止时刻 NN 满足 RN=0R_N=0

每一轮相当于在 RkR_k 个元素的随机排列中统计“不动点”个数,其期望恒为 1,因此

E[Rk+1Fk]=Rk1.\mathbb{E}[R_{k+1}\mid\mathcal{F}_k]=R_k-1.

于是 Xk:=Rk+kX_k:=R_k+k 为鞅,且 XN=RN+N=NX_N=R_N+N=NX0=nX_0=n。可选停止给出

E[N]=n.\boxed{\mathbb{E}[N]=n}.

类似地可构造二次型鞅(或用 E[Rk+12Fk]=Rk22Rk+2\mathbb{E}[R_{k+1}^2\mid\mathcal{F}_k]=R_k^2-2R_k+2)得到

E[N2]=n2+nVar(N)=n.\mathbb{E}[N^2]=n^2+n\Rightarrow \boxed{\operatorname{Var}(N)=n}.