fbpx
维基百科

错排问题

错排问题组合数学中的问题之一。考虑一个有个元素的排列,若一个排列中所有的元素都不在自己原来的位置上,那么这样的排列就称为原排列的一个错排个元素的错排数记为。 研究一个排列错排个数的问题,叫做错排问题或称为更列问题

最早研究错排问题的是尼古拉·伯努利欧拉,因此历史上也称为伯努利-欧拉的装错信封的问题。这个问题有许多具体的版本,如在写信时将封信装到个不同的信封里,有多少种全部装错信封的情况?又比如四人各写一张贺年卡互相赠送,有多少种赠送方法?自己写的贺年卡不能送给自己,所以也是典型的错排问题。

定義 编辑

  上沒有不動點的排列(即 )的個數, 的值如下:(由 起)

0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, ... [1]

不難發現,這個數列有一個規律

 

例如有 封收件人不同的信,隨機放入 個寫了收件人地址的信封中寄出,求沒有一個收件人收到他所應接收的信的機率。當 ,設四封信為ABCD,則在 個排列之中,只有9個是錯排,即 

BADC, BCDA, BDAC, CADB, CDAB, CDBA, DABC, DCAB, DCBA

所以其機率為

 

历史 编辑

18世纪的法国数学家尼古拉·伯努利(1687-1759年)是最早考虑这个问题的人。之后欧拉也开始对这个问题感兴趣,并称之为“组合数学中的一个奇妙问题”(拉丁文:a quaestio curiosa ex doctrina combinationis),并独立解决了这个问题[2]

研究错排问题的方法 编辑

枚举法 编辑

对于情况较少的排列,可以使用枚举法[3]

  • 当n=1时,全排列只有一种,不是错排,D1 = 0。
  • 当n=2时,全排列有两种,即1、2和2、1,后者是错排,D2 = 1。
  • 当n=3时,全排列有六种,即1、2、3;1、3、2;2、1、3;2、3、1;3、1、2;3、2、1,其中只有有3、1、2和2、3、1是错排,D3=2。用同样的方法可以知道D4=9。
  • 最小的几个错排数是:D1 = 0,D2 = 1,D3=2,D4 = 9,D5 = 44,D6 = 265,D7 = 1854。[4]

递推数列法 编辑

对于排列数较多的情况,难以采用枚举法。这时可以用递归思想推导错排数的遞迴關係式

显然D1=0,D2=1。当n≥3时,不妨设n排在了第k位,其中k≠n,也就是1≤k≤n-1。那么我们现在考虑k的情况。

  • 当k排在第n位时,除了n和k以外还有n-2个数,其错排数为Dn-2
  • 当k不排在第n位时,那么将第n位重新考虑成一个新的“第k位”,这时的包括k在内的剩下n-1个数的每一种错排,都等价于只有n-1个数时的错排(只是其中的第k位会换成第n位)。其错排数为Dn-1

所以当n排在第k位时共有Dn-2+Dn-1种错排方法,又k有从1到n-1共n-1种取法,我们可以得到:

Dn=(n-1)(Dn-1+Dn-2) [2]

在上面我们得到

Dn=(n-1)(Dn-1+Dn-2)

从这个公式中我们可以推出Dn的通项公式,方法如下:

为书写方便,记Dn = n!Mn,则M1 = 0, M2 =  

当n大于等于3时,由

Dn = (n-1)(Dn-1 + Dn-2),

 

所以, 

于是有  

所以

 

将上面式子分边累加,得

 

因此,我们得到错排公式

 

多项式模拟 编辑

 错排, 需排在  需排在 如此类推。

 ,错排结果为  的系数

 基本对称多项式

 

 选出 ,然后从 选出 ,组成 

 选出r个x有 种可能,从 选出其余的n-r个x有

 

种可能

 

简化公式 编辑

错位排列数的公式可以简化为: 

其中的  高斯取整函数(小于等于 n 的最大整数)[5]

这个简化公式可以由之前的错排公式推导出来。事实上,考虑指数函数在 0 处的泰勒展开

 

所以, 。其中 Rn 是泰勒展开的餘项,c 是介于 0 和 1 之间的某个实数。Rn绝对值上限为

 
 

当 n≥2 时,  严格小于 0.5,所以   是最接近   的整数,可以写成

 

参考资料 编辑

  1. ^ Sloane, N.J.A. (编). Sequence A000166 (Subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.). The On-Line Encyclopedia of Integer Sequences. OEIS Foundation. 
  2. ^ 2.0 2.1 Heinrich Dörrie. Triumph der Mathematik: hundert berühmte Probleme aus zwei Jahrtausenden mathematischer Kultur. Courier Dover Publications. 1965 (英语). 第19-21页
  3. ^ 卢开澄、卢华明. 《组合数学》. 清华大学出版社. ISBN 730213961X (中文(简体)). 
  4. ^ Miodrag Petković. Famous puzzles of great mathematicians. American Mathematical Soc. 2009. ISBN 9780821848142 (英语). 第184-186页
  5. ^ Branislav Kisačanin. Mathematical problems and proofs: combinatorics, number theory, and geometry. Springer. 1998. ISBN 9780306459672 (英语). 第43-44页

错排问题, 是组合数学中的问题之一, 考虑一个有n, displaystyle, 个元素的排列, 若一个排列中所有的元素都不在自己原来的位置上, 那么这样的排列就称为原排列的一个错排, displaystyle, 个元素的错排数记为dn, displaystyle, displaystyle, 研究一个排列错排个数的问题, 叫做或称为更列问题, 最早研究的是尼古拉, 伯努利和欧拉, 因此历史上也称为伯努利, 欧拉的装错信封的问题, 这个问题有许多具体的版本, 如在写信时将n, displaystyle, 封信装到n. 错排问题是组合数学中的问题之一 考虑一个有n displaystyle n 个元素的排列 若一个排列中所有的元素都不在自己原来的位置上 那么这样的排列就称为原排列的一个错排 n displaystyle n 个元素的错排数记为Dn displaystyle D n 或 n displaystyle n 研究一个排列错排个数的问题 叫做错排问题或称为更列问题 最早研究错排问题的是尼古拉 伯努利和欧拉 因此历史上也称为伯努利 欧拉的装错信封的问题 这个问题有许多具体的版本 如在写信时将n displaystyle n 封信装到n displaystyle n 个不同的信封里 有多少种全部装错信封的情况 又比如四人各写一张贺年卡互相赠送 有多少种赠送方法 自己写的贺年卡不能送给自己 所以也是典型的错排问题 目录 1 定義 2 历史 3 研究错排问题的方法 3 1 枚举法 3 2 递推数列法 4 多项式模拟 5 简化公式 6 参考资料定義 编辑記Dn displaystyle D n nbsp 為 1 2 n displaystyle 1 2 dots n nbsp 上沒有不動點的排列 即ϕ 1 2 n 1 2 n ϕ i i 1 i n displaystyle phi 1 2 dots n to 1 2 dots n phi i neq i forall 1 leq i leq n nbsp 的個數 Dn displaystyle D n nbsp 的值如下 由n 1 displaystyle n 1 nbsp 起 0 1 2 9 44 265 1854 14833 133496 1334961 14684570 176214841 2290792932 1 不難發現 這個數列有一個規律 Dn nDn 1 1 n displaystyle D n nD n 1 1 n nbsp 例如有n displaystyle n nbsp 封收件人不同的信 隨機放入n displaystyle n nbsp 個寫了收件人地址的信封中寄出 求沒有一個收件人收到他所應接收的信的機率 當n 4 displaystyle n 4 nbsp 設四封信為ABCD 則在4 24 displaystyle 4 24 nbsp 個排列之中 只有9個是錯排 即 4 9 displaystyle 4 9 nbsp BADC BCDA BDAC CADB CDAB CDBA DABC DCAB DCBA所以其機率為924 37 5 displaystyle frac 9 24 37 5 nbsp 历史 编辑18世纪的法国数学家尼古拉 伯努利 1687 1759年 是最早考虑这个问题的人 之后欧拉也开始对这个问题感兴趣 并称之为 组合数学中的一个奇妙问题 拉丁文 a quaestio curiosa ex doctrina combinationis 并独立解决了这个问题 2 研究错排问题的方法 编辑枚举法 编辑 对于情况较少的排列 可以使用枚举法 3 当n 1时 全排列只有一种 不是错排 D1 0 当n 2时 全排列有两种 即1 2和2 1 后者是错排 D2 1 当n 3时 全排列有六种 即1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1 其中只有有3 1 2和2 3 1是错排 D3 2 用同样的方法可以知道D4 9 最小的几个错排数是 D1 0 D2 1 D3 2 D4 9 D5 44 D6 265 D7 1854 4 递推数列法 编辑 对于排列数较多的情况 难以采用枚举法 这时可以用递归思想推导错排数的遞迴關係式 显然D1 0 D2 1 当n 3时 不妨设n排在了第k位 其中k n 也就是1 k n 1 那么我们现在考虑k的情况 当k排在第n位时 除了n和k以外还有n 2个数 其错排数为Dn 2 当k不排在第n位时 那么将第n位重新考虑成一个新的 第k位 这时的包括k在内的剩下n 1个数的每一种错排 都等价于只有n 1个数时的错排 只是其中的第k位会换成第n位 其错排数为Dn 1 所以当n排在第k位时共有Dn 2 Dn 1种错排方法 又k有从1到n 1共n 1种取法 我们可以得到 Dn n 1 Dn 1 Dn 2 2 在上面我们得到Dn n 1 Dn 1 Dn 2 从这个公式中我们可以推出Dn的通项公式 方法如下 为书写方便 记Dn n Mn 则M1 0 M2 12 displaystyle frac 1 2 nbsp 当n大于等于3时 由Dn n 1 Dn 1 Dn 2 即n Mn n 1 n 1 Mn 1 n 1 n 2 Mn 2 n Mn 1 n 1 Mn 1 n 1 Mn 2 displaystyle n M n n 1 n 1 M n 1 n 1 n 2 M n 2 n M n 1 n 1 M n 1 n 1 M n 2 nbsp 所以 nMn nMn 1 Mn 1 Mn 2 displaystyle nM n nM n 1 M n 1 M n 2 nbsp 于是有 Mn Mn 1 1n Mn 1 Mn 2 1n 1n 1 13 M2 M1 1 n1n displaystyle M n M n 1 frac 1 n M n 1 M n 2 frac 1 n frac 1 n 1 frac 1 3 M 2 M 1 1 n frac 1 n nbsp 所以 Mn Mn 1 1 n1n Mn 1 Mn 2 1 n 1 1 n 1 M2 M1 1 212 displaystyle begin aligned M n M n 1 amp 1 n frac 1 n M n 1 M n 2 amp 1 n 1 frac 1 n 1 vdots quad amp quad vdots M 2 M 1 amp 1 2 frac 1 2 end aligned nbsp 将上面式子分边累加 得Mn 1 212 1 313 1 n1n displaystyle M n 1 2 frac 1 2 1 3 frac 1 3 1 n frac 1 n nbsp 因此 我们得到错排公式Dn n Mn n 12 13 1 n1n displaystyle D n n M n n frac 1 2 frac 1 3 1 n frac 1 n nbsp 多项式模拟 编辑x1 x2 xn displaystyle x 1 x 2 x n nbsp 错排 x1 displaystyle x 1 nbsp 需排在x2 x3 xn displaystyle x 2 x 3 x n nbsp x2 displaystyle x 2 nbsp 需排在x1 x3 xn displaystyle x 1 x 3 x n nbsp 如此类推 记s r 1nxr displaystyle s sum r 1 n x r nbsp 错排结果为 r 1n s xr displaystyle displaystyle prod r 1 n s x r nbsp 中 r 1nxr displaystyle displaystyle prod r 1 n x r nbsp 的系数记ar 1 r x1x2 xr displaystyle a r 1 r sum x 1 x 2 x r nbsp 为基本对称多项式 r 1n s xr r 0narsn r r 2narsn r displaystyle displaystyle prod r 1 n s x r sum r 0 n a r s n r sum r 2 n a r s n r nbsp 从ar displaystyle a r nbsp 选出x1 x2 xr displaystyle x 1 x 2 x r nbsp 然后从sn r displaystyle s n r nbsp 选出xr 1 xr 2 xn displaystyle x r 1 x r 2 x n nbsp 组成 r 1nxr displaystyle displaystyle prod r 1 n x r nbsp 从ar displaystyle a r nbsp 选出r个x有Crn displaystyle C r n nbsp 种可能 从s displaystyle s nbsp 选出其余的n r个x有 n r 1 1 1 n r displaystyle frac n r 1 1 1 n r nbsp 种可能 r 2n 1 rCrn n r n r 2n 1 rr displaystyle displaystyle sum r 2 n 1 r C r n n r n sum r 2 n frac 1 r r nbsp 简化公式 编辑错位排列数的公式可以简化为 Dn n e 0 5 displaystyle D n left lfloor frac n e 0 5 right rfloor nbsp 其中的 n displaystyle lfloor n rfloor nbsp 为高斯取整函数 小于等于 n 的最大整数 5 这个简化公式可以由之前的错排公式推导出来 事实上 考虑指数函数在 0 处的泰勒展开 e 1 1 1 11 1 22 1 n1n e c n 1 c 1 n 12 13 1 n1n Rn Dnn Rn displaystyle begin aligned e 1 amp 1 frac left 1 right 1 1 frac left 1 right 2 2 cdots left 1 right n frac 1 n frac e c n 1 left c 1 right n amp frac 1 2 frac 1 3 cdots left 1 right n frac 1 n R n amp frac D n n R n end aligned nbsp 所以 n e Dn n Rn displaystyle frac n e D n n R n nbsp 其中 Rn 是泰勒展开的餘项 c 是介于 0 和 1 之间的某个实数 Rn 的绝对值上限为 Rn e0 n 1 1 n 1 displaystyle R n leqslant frac e 0 n 1 frac 1 n 1 nbsp n e Dn n n 1 1 n 1 displaystyle Big frac n e D n Big leqslant frac n n 1 frac 1 n 1 nbsp 当 n 2 时 1 n 1 displaystyle frac 1 n 1 nbsp 严格小于 0 5 所以 Dn n 12 13 1 n1n displaystyle D n n left frac 1 2 frac 1 3 1 n frac 1 n right nbsp 是最接近 n e displaystyle frac n e nbsp 的整数 可以写成 Dn n e 0 5 displaystyle D n left lfloor frac n e 0 5 right rfloor nbsp 参考资料 编辑 Sloane N J A 编 Sequence A000166 Subfactorial or rencontres numbers or derangements number of permutations of n elements with no fixed points The On Line Encyclopedia of Integer Sequences OEIS Foundation 2 0 2 1 Heinrich Dorrie Triumph der Mathematik hundert beruhmte Probleme aus zwei Jahrtausenden mathematischer Kultur Courier Dover Publications 1965 英语 第19 21页 卢开澄 卢华明 组合数学 清华大学出版社 ISBN 730213961X 中文 简体 Miodrag Petkovic Famous puzzles of great mathematicians American Mathematical Soc 2009 ISBN 9780821848142 英语 第184 186页 Branislav Kisacanin Mathematical problems and proofs combinatorics number theory and geometry Springer 1998 ISBN 9780306459672 英语 第43 44页 取自 https zh wikipedia org w index php title 错排问题 amp oldid 80048496, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。