You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

递归推导错位排列概率递推公式的错误排查请求

递归推导错位排列概率递推公式的错误排查请求

问题背景

Suppose there are $n$ people invited to a party. Seats are assigned and a name card is made for each guest. However, floral arrangements on the table unexpectedly obscure the name cards. When the $n$ guests arrive, they seat themselves randomly.

Show that the probability that no one seats at the assigned seats is $$P_n = \frac{n-1}{n} P_{n-1} + \frac1n P_{n-2}.$$

我的推导尝试

We consider a letter $i$, where $i \in {1, \dots, n}$.

Let $E$ denote the event that no one sits at the right spot.

Let $X_i$ be an indicator variable s.t. $X_i = 1$ indicates the ith person sits at the right spot.

Then $Pr(E) = Pr(E \cap X_i = 0) + Pr(E \cap X_i = 1)$.

Note that $Pr(E \cap X_i = 1) = 0$ because it's impossible.

Then only need to compute:
$$
\begin{align}
Pr(E \cap X_i = 0)
&= \sum_{j = 1, j \neq i}^{n}Pr(E \cap \text{person i in seat j}) \
&= \sum_{j = 1, j \neq i}^{n}
\left( Pr(E \vert S_{i,j} \cap S_{j,i}) \times Pr(S_{i,j}\cap S_{j,i}) \

  • Pr(E \vert S_{i,j} \cap S_{j,i}^C) \times Pr(S_{i,j}\cap S_{j,i}^C)
    \right)
    \end{align}
    $$
    where $S_{i,j}={\text{person }i\text{ in seat }j}$ and $S_{i,j}^C$ denotes the complement, $S_{i,j}^C={\text{person }i\text{ not in seat }j}$.

Then
$$Pr(E \vert \text{person i in seat j} \cap \text{person j in seat i}) = P_{n-2},$$
$$Pr(E \vert \text{person i in seat j} \cap \text{person j not in seat i}) = P_{n-1},$$
$$Pr(\text{person i in seat j} \cap \text{person j in seat i}) = \frac{1}{n(n-1)},$$
$$Pr(\text{person i in seat j} \cap \text{person j not in seat i}) = \frac{n-2}{n(n-1)}.$$

And this sums up as $$\frac1n P_{n-2} + \frac{n-2}{n}P_{n-1}.$$

我的疑问

我找不到哪里出错了,有人能帮我指出问题吗?还是我的方法完全错了?


备注:内容来源于stack exchange,提问作者alice123019

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 12:27:59