排列,也称为“安排数”或“次序”,是有序列表
的元素的重新排列,使其与
自身形成一一对应。在一个包含
个元素的集合上的排列数由
给出(
阶乘;Uspensky 1937, p. 18)。例如,
种
的排列,即
和
,以及
种
的排列,即
、
、
、
、
和
。Wolfram 语言中可以使用以下命令找到列表的排列排列[list]。可以使用以下命令在 Wolfram 语言中测试长度为
的列表是否是 1, ...,
的排列PermutationListQ[list]。
Sedgewick (1977) 总结了许多生成排列的算法,并指出 Heap (1963) 的最小更改排列算法通常是最快的(Skiena 1990, p. 10)。Johnson (1963; Séroul 2000, pp. 213-218) 给出了另一种枚举排列的方法。
从一个包含
个元素的集合中获得
个元素的有序子集的方式的数量由下式给出
![_nP_k=(n!)/((n-k)!)](/images/equations/Permutation/NumberedEquation1.svg) |
(1)
|
(Uspensky 1937, p. 18),其中
是阶乘。例如,
种
的 2-子集,即
、
、
、
、
、
、
、
、
、
、
和
。包含
个元素的无序子集被称为给定集合的 k-子集。
将排列表示为置换环的乘积是唯一的(直到循环的顺序)。循环分解的一个例子是
对
的排列。这表示为
,对应于不相交的置换环 (2) 和 (143)。在选择循环分解的表示形式时有很大的自由度,因为 (1) 循环是不相交的,因此可以按任何顺序指定,并且 (2) 给定循环的任何旋转都指定相同的循环(Skiena 1990, p. 20)。因此,(431)(2)、(314)(2)、(143)(2)、(2)(431)、(2)(314) 和 (2)(143) 都描述了相同的排列。
另一种表示法明确地标识了应用在
个元素上的排列之前和之后元素所占据的位置,它使用一个
矩阵,其中第一行是
,第二行是新的排列。例如,交换元素 1 和 2 并固定 3 的排列可以写成
![[1 2 3; 2 1 3].](/images/equations/Permutation/NumberedEquation2.svg) |
(2)
|
任何排列也是对换的乘积。排列通常以字典序或对换序表示。排列与一对杨氏 tableau 之间存在对应关系,称为 Schensted 对应。
个对象的错误排列数为
,其中
是最近整数函数。在
个有序对象中,没有对象在其自然位置的排列称为错位排列(或有时,完全排列),并且此类排列的数量由次阶乘
给出。
使用
![(x+y)^n=sum_(r=0)^n(n; r)x^(n-r)y^r](/images/equations/Permutation/NumberedEquation3.svg) |
(3)
|
其中
给出
![2^n=sum_(r=0)^n(n; r),](/images/equations/Permutation/NumberedEquation4.svg) |
(4)
|
因此,一次选择 0、1、... 或
个元素的方式的数量是
。
可以使用以下递归过程获得集合 1, ...,
的所有排列
![1 2; / ; 2 1](/images/equations/Permutation/NumberedEquation5.svg) |
(5)
|
![1 2 3; / ; 1 3 2 ; / ; 3 1 2 ; | ; 3 2 1 ; \ ; 2 3 1 ; \ ; 2 1 3](/images/equations/Permutation/NumberedEquation6.svg) |
(6)
|
考虑其中没有连续元素对(即,上升或下降的连续)出现的排列。对于
, 2, ... 个元素,此类排列的数量为 1, 0, 0, 2, 14, 90, 646, 5242, 47622, ... (OEIS A002464)。
设 整数 集合 1, 2, ...,
被排列,并且得到的序列被分成递增的游程。当
接近 无穷大 时,将第
个游程的平均长度表示为
,
。前几个值总结在下表中,其中 e 是自然对数的底数(Le Lionnais 1983, pp. 41-42;Knuth 1998)。
另请参见
交错排列,
取球,
二项式系数,
选择,
圆排列,
组合,
错位排列,
欧拉数,
偶排列,
k-子集,
线性扩展,
夫妻就座问题,
多重选择,
多项式系数,
多重集,
奇排列,
排列上升,
置换环,
排列倒置,
排列矩阵,
排列模式,
排列游程,
排列符号,
随机排列,
字符串,
次阶乘,
对换 在 MathWorld 课堂中探索此主题
使用 Wolfram|Alpha 探索
参考文献
Bogomolny, A. "Graphs." http://www.cut-the-knot.org/do_you_know/permutation.shtml.Conway, J. H. and Guy, R. K. "Arrangement Numbers." In The Book of Numbers. New York: Springer-Verlag, p. 66, 1996.Dickau, R. M. "Permutation Diagrams." http://mathforum.org/advanced/robertd/permutations.html.Heap, B. R. "Permutations by Interchanges." Computer J. 6, 293-294, 1963.Johnson, S. M. "Generation of Permutations by Adjacent Transpositions." Math. Comput. 17, 282-285, 1963.Knuth, D. E. The Art of Computer Programming, Vol. 3: Sorting and Searching, 2nd ed. Reading, MA: Addison-Wesley, pp. 38-43, 1998.Kraitchik, M. "The Linear Permutations of
Different Things." §10.1 in Mathematical Recreations. New York: W. W. Norton, pp. 239-240, 1942.Le Lionnais, F. Les nombres remarquables. Paris: Hermann, 1983.Ruskey, F. "Information on Permutations." http://www.theory.csc.uvic.ca/~cos/inf/perm/PermInfo.html.Sedgewick, R. "Permutation Generation Methods." Comput. Surveys 9, 137-164, 1977.Séroul, R. "Permutations: Johnson's' [sic] Algorithm." §8.15 in Programming for Mathematicians. Berlin: Springer-Verlag, pp. 213-218, 2000.Skiena, S. "Permutations." §1.1 in Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, pp. 3-16, 1990.Sloane, N. J. A. Sequences A000142/M1675, A002464/M2070, A091131, A091132, and A091133 in "The On-Line Encyclopedia of Integer Sequences."Trotter, H. F. "Perm (Algorithm 115)." Comm. ACM 5, 434-435, 1962.Uspensky, J. V. Introduction to Mathematical Probability. New York: McGraw-Hill, p. 18, 1937.在 Wolfram|Alpha 上被引用
排列
请引用为
Weisstein, Eric W. "排列。" 来自 MathWorld--Wolfram Web 资源。 https://mathworld.net.cn/Permutation.html
主题分类