P6601

wuhupai發表於2024-08-04

我們發現每一時刻的小球位置只可能有兩種,這和它瞬移的次數有關。在每個時刻內,都有兩種可能的方案。對於每個時刻瞬移次數為奇數的機率就是\(\sum_{i=0}^{t} {n \choose i} p^{i}*(1-p)^{t-i}[i\%2==1]\),偶數就是\(\sum_{i=0}^{t} {n \choose i} p^{i}*(1-p)^{t-i}[i\%2==0]\)
根據機率的定義和古典概型(每種方案選到的機率相等),是總機率除以總方案數。那麼答案就是\(\frac{1}{2n(t+1)} \sum_{i=0}^{t} even_{i}^{2}+odd_{i}^{2}\)考慮將mod 2拆掉\(\frac{1-(-1)^{i}}{2}\)那麼答案就是\(\frac{1}{2n(t+1)} \sum_{i=0}^{t} (\frac{1-(-1)^{i}}{2}*\sum_{i=0}^{t} {n \choose i} p^{i}*(1-p)^{t-i})^{2}+(\frac{1+(-1)^{i}}{2}\sum_{i=0}^{t} {n \choose i} p^{i}*(1-p)^{t-i})^{2}\)

\[\sum_{i=0}^{t} {n \choose i} p^{i}*(1-p)^{t-i}[i\%2==1] \]

\[\sum_{i=0}^{t} {n \choose i} p^{i}*(1-p)^{t-i}*\frac{1-(-1)^{i}}{2} \]

\[\frac{1}{2}\sum_{i=0}^{t} {n \choose i} p^{i}*(1-p)^{t-i} -\frac{1}{2}\sum_{i=0}^{t} {n \choose i} (-p)^{i}*(1-p)^{t-i} \]

\[\frac{1}{2}-\frac{1}{2}(1-2p)^{t} \]

這就是奇數的情況

\[\frac{1}{2}+\frac{1}{2}(1-2p)^{t} \]

\[\frac{1}{2n(t+1)} \sum_{i=0}^{t} even_{i}^{2}+odd_{i}^{2} \]

\[\frac{1}{2n(t+1)} \sum_{i=0}^{t} (\frac{1}{2}-\frac{1}{2}(1-2p)^{t})^{2}+(\frac{1}{2}+\frac{1}{2}(1-2p)^{t})^{2} \]

設$$x=\frac{1}{2},y=\frac{1}{2}(1-2p)^{t}$$
原式

\[=\frac{1}{2n(t+1)} \sum_{i=1}^{t+1} (x-y)^{2}+(x+y)^{2} \]

\[=\frac{1}{n(t+1)} \sum_{i=1}^{t+1} x^{2}+y^{2} \]

\[=\frac{1}{4n(t+1)} \sum_{i=1}^{t+1} 1+(1-2p)^{2i} \]

\[=\frac{1}{4n(t+1)} (t+1+\sum_{i=1}^{t+1} (1-2p)^{2i}) \]

等比數列求和
設 $$S=\sum_{i=1}^{t+1} (1-2p)^{2i}$$

\[(1-2p)^{2}*S=\sum_{i=1}^{t+2} (1-2p)^{2i} \]

\[S*((1-2p)^{2}-1)=(1-2p)^{2t+4}-(1-2p)^{2} \]

\[S=\frac{(1-2p)^{2t+4}-(1-2p)^{2}}{(1-2p)^{2}-1} \]

參考nacly_fish的題解