fbpx
维基百科

逆序对

计算机科学离散数学中,一个序列的逆序(inversion),是失去自然次序的元素对。

这个置换中的一个逆序对,表示为位置对(2,4)或元素对(5,2)。
这个置换的逆序,使用基于位置表示法表示为:(1, 3), (1, 4), (2, 3), (2, 4)和(2, 5);
或者使用基于元素表示法表示为:(3, 1), (3, 2), (5, 1), (5, 2)和(5, 4)。

定義 编辑

逆序 编辑

 
一个四元素置换的从基于位置逆序到基于元素逆序的映射。

 為一個排列,如果 而且 , 這個位置(有称为“序位”)对 [1][2],或者這个元素对 [3][4][5],被稱為是 的一個逆序。

逆序集是所有逆序的集合。一個排列 的使用基于位置表示法的逆序集,相同于其反向排列 的使用基于元素表示法的逆序集,只有每个有序对的两个分量交換位置,反之亦然[6]

通常逆序是對於排列的定義,但也可以用於序列: 設 是一個序列(或多重集排列[7])。如果 而且 , 這個位置对 [7][8],或者這个元素对 [9],被稱為是 的一個逆序。

對於序列,根據基于元素定义的逆序不是唯一性的,因為不同的位置对上可能有相同的值對。

逆序數 编辑

序列 逆序數 [10],是逆序集的,它常用於量度排列[5]或序列[9]的已排序程度(有时叫做预排序度presortedness)。逆序数在  之间,含二者。

在一個排列的箭頭指向圖中,它是箭頭指向相交叉的數[6],也是從单位排列而得到的Kendall tau距離英语Kendall tau distance,以及每個与逆序有關的向量之和,它们在后面章节中定義。

對於逆序數,基于位置与基于元素定義之间的分別並不重要,因為排列及其反向排列都具有相同的逆序數。

其它測量(預先)排序程度的方式,包括了為排好序列而從序列中可以刪除元素的最小數量,對序列所“運行”排序的次數和長度,每個元素在已排序位置之上的距離總和(Spearman footrule),以及排序過程中必需的最少交換次數[11]。比較排序算法計算逆序數的時間為 [12]

目前求逆序对数目比较普遍的方法,是利用归并排序做到 时间复杂度;也可以利用树状数组、线段树来实现这种基础功能。复杂度均为 

逆序有關的向量 编辑

有三個類似的向量用於將排列的逆序,壓縮到能唯一確定它的这个向量中。它們通常被稱為逆序向量Lehmer碼英语Lehmer code。这里的定义及公式来源于逆序 (离散数学)。

本文將逆序向量記為 [13],其它的兩個向量有時分別稱為“左”和“右”逆序向量;為了避免與前面的逆序向量混淆,本文將另兩個分別稱為“左逆序計數” 和“右逆序計數” 。左逆序計數是以反向colexicographic次序的排列[14],右逆序計數則是以字典序的排列。

 
Rothe图

逆序向量 
采用基于元素的定義, 是有序对較小(右)分量為 的逆序數[3]

 是在 之中于 之前,大于 的元素的數量。
 

其更符合直觉的定义方式为:

 是在 之中于 之前,大于 的元素的数量。
 

后者定义也适用于没有反向对应者的序列。

左逆序計數 
采用基于位置的定義, 是有序对較大(右)分量為 的逆序數。

 是在 之中于 之前,大于 的元素的數量。
 

右逆序計數 ,通常稱為Lehmer碼
采用基于位置的定義, 是有序对較小(左)分量為 的逆序數。

  之中于 之後,小于 的元素的數量。
 

  之间的关系:

 

 

 的第一个数字和 的最后一个数字总是 ,可以省略。

Rothe圖可以協助找出  Rothe英语Heinrich August Rothe圖是以黑點來表示1的排列矩陣,每一個位置上若為逆序(通常以叉號表示),則在其右側與下方即有一點。 是圖中第 列排列逆序的加總,而  欄中排列逆序的加總。排列矩陣的逆矩阵即是此矩陣的轉置矩陣,因此某一排列的 即是它轉置矩陣的 ,反之亦然。

  之间的关系:

 

範例:四個元素的全部排列 编辑

 
四個元素的6種可能逆序

下面可排序表顯示了四個元素的集合,它的逆序集會有不同位置的24種排列、逆序相關向量和逆序數(右欄是它的反向排列,用於以colex排序)。可以看出  的位數總是相同,而  與位逆序集有關。 最右側欄是排列左上右下對角線的總和,如三角形圖示,以及 是左下右上對角線的總和(配對在下降對角線中其右側都是 組成,而在上升對角線中的左側都是 組成)。 此表中 的預設排序是反向colex次序,這與 的colex次序相同。 的字典序與 的字典序相同。

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
      p-b   #
0   1234 4321 0000 0000 0000 0000   0000 0000 0
1   2134 4312 1000 0001 0010 0100   1000 0001 1
2   1324 4231 0100 0010 0100 0010   0100 0010 1
3   3124 4213 1100 0011 0110 0110   2000 0002 2
4   2314 4132 2000 0002 0200 0020   1100 0011 2
5   3214 4123 2100 0012 0210 0120   2100 0012 3
6   1243 3421 0010 0100 1000 0001   0010 0100 1
7   2143 3412 1010 0101 1010 0101   1010 0101 2
8   1423 3241 0110 0110 1100 0011   0200 0020 2
9   4123 3214 1110 0111 1110 0111   3000 0003 3
10   2413 3142 2010 0102 1200 0021   1200 0021 3
11   4213 3124 2110 0112 1210 0121   3100 0013 4
12   1342 2431 0200 0020 2000 0002   0110 0110 2
13   3142 2413 1200 0021 2010 0102   2010 0102 3
14   1432 2341 0210 0120 2100 0012   0210 0120 3
15   4132 2314 1210 0121 2110 0112   3010 0103 4
16   3412 2143 2200 0022 2200 0022   2200 0022 4
17   4312 2134 2210 0122 2210 0122   3200 0023 5
18   2341 1432 3000 0003 3000 0003   1110 0111 3
19   3241 1423 3100 0013 3010 0103   2110 0112 4
20   2431 1342 3010 0103 3100 0013   1210 0121 4
21   4231 1324 3110 0113 3110 0113   3110 0113 5
22   3421 1243 3200 0023 3200 0023   2210 0122 5
23   4321 1234 3210 0123 3210 0123   3210 0123 6

排列的弱次序 编辑

 
对称群的Permutohedron S4

n物品排列的集合其部份次序的結構,稱為排列的弱次序,而構成。 以逆序集的子集關係繪出的哈斯圖,則構成了稱為permutohedron的骨架。 如果依位置將某一排列分配給每個逆序集,所得到的排序是permutohedron的次序,其中的邊對應於連續兩元素的交換。這是排列的弱排序。The identity is its minimum, and the permutation formed by reversing the identity is its maximum. 如果依元素將某一排列分配給每個逆序集,所得到的排序將是凱萊圖的次序,其中的邊對應於連續兩元素的交換。對稱組的凱萊圖與其permutohedron相似,但是每個排列由其反向替換。

参见 编辑

引用 编辑

  1. ^ Aigner 2007,第27頁.
  2. ^ Comtet 1974,第237頁.
  3. ^ 3.0 3.1 Knuth 1973,第11頁.
  4. ^ Pemmaraju & Skiena 2003,第69頁.
  5. ^ 5.0 5.1 Vitter & Flajolet 1990,第459頁.
  6. ^ 6.0 6.1 Gratzer 2016,第221頁.
  7. ^ 7.0 7.1 Bóna 2012,第57頁.
  8. ^ Cormen et al. 2001,第39頁.
  9. ^ 9.0 9.1 Barth & Mutzel 2004,第183頁.
  10. ^ Mannila 1985.
  11. ^ Mahmoud 2000,第284頁.
  12. ^ Kleinberg & Tardos 2005,第225頁.
  13. ^ Weisstein, Eric W. "Inversion Vector" From MathWorld--A Wolfram Web Resource
  14. ^ Reverse colex order of finitary permutations (OEIS數列A055089

参考书目 编辑

  • Aigner, Martin. Word Representation. A course in enumeration. Berlin, New York: Springer. 2007. ISBN 978-3642072536. 
  • Barth, Wilhelm; Mutzel, Petra. Simple and Efficient Bilayer Cross Counting. Journal of Graph Algorithms and Applications. 2004, 8 (2): 179–194. doi:10.7155/jgaa.00088 . 
  • Bóna, Miklós. 2.2 Inversions in Permutations of Multisets. Combinatorics of permutations. Boca Raton, FL: CRC Press. 2012. ISBN 978-1439850510. 
  • Comtet, Louis. 6.4 Inversions of a permutation of [n]. Advanced combinatorics; the art of finite and infinite expansions. Dordrecht,Boston: D. Reidel Pub. Co. 1974. ISBN 9027704414. 
  • Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford. Introduction to Algorithms 2nd. MIT Press and McGraw-Hill. 2001. ISBN 0-262-53196-8. 
  • Gratzer, George. 7-2 Basic objects. Lattice theory. special topics and applications. Cham, Switzerland: Birkhäuser. 2016. ISBN 978-3319442358. 
  • Kleinberg, Jon; Tardos, Éva. Algorithm Design. 2005. ISBN 0-321-29535-8. 
  • Knuth, Donald. 5.1.1 Inversions. The Art of Computer Programming. Addison-Wesley Pub. Co. 1973. ISBN 0201896850. 
  • Mahmoud, Hosam Mahmoud. Sorting Nonrandom Data. Sorting: a distribution theory. Wiley-Interscience series in discrete mathematics and optimization 54. Wiley-IEEE. 2000. ISBN 978-0-471-32710-3. 
  • Pemmaraju, Sriram V.; Skiena, Steven S. Permutations and combinations. Computational discrete mathematics: combinatorics and graph theory with Mathematica. Cambridge University Press. 2003. ISBN 978-0-521-80686-2. 
  • Vitter, J.S.; Flajolet, Ph. Average-Case Analysis of Algorithms and Data Structures. van Leeuwen, Jan (编). Algorithms and Complexity 1 2nd. Elsevier. 1990. ISBN 978-0-444-88071-0. 

延伸阅读 编辑

  • Margolius, Barbara H. Permutations with Inversions. Journal of Integer Sequences. 2001, 4. 

预排序度测度 编辑

  • Mannila, Heikki. Measures of presortedness and optimal sorting algorithms. IEEE Transactions on Computers. April 1985, C–34 (4): 318–325. doi:10.1109/tc.1985.5009382. 
  • Estivill-Castro, Vladimir; Wood, Derick. A new measure of presortedness. Information and Computation. 1989, 83 (1): 111–119. doi:10.1016/0890-5401(89)90050-3 . 
  • Skiena, Steven S. Encroaching lists as a measure of presortedness. BIT. 1988, 28 (4): 755–784. S2CID 33967672. doi:10.1007/bf01954897. 

逆序对, 此條目需要精通或熟悉相关主题的编者参与及协助编辑, 2014年4月8日, 請邀請適合的人士改善本条目, 更多的細節與詳情請參见討論頁, 在计算机科学和离散数学中, 一个序列的逆序, inversion, 是失去自然次序的元素对, 这个置换中的一个, 表示为位置对, 或元素对, 这个置换的逆序, 使用基于位置表示法表示为, 或者使用基于元素表示法表示为, 目录, 定義, 逆序, 逆序數, 逆序有關的向量, 範例, 四個元素的全部排列, 排列的弱次序, 参见, 引用, 参考书目, 延伸阅读, 预排序度测度定義. 此條目需要精通或熟悉相关主题的编者参与及协助编辑 2014年4月8日 請邀請適合的人士改善本条目 更多的細節與詳情請參见討論頁 在计算机科学和离散数学中 一个序列的逆序 inversion 对 是失去自然次序的元素对 这个置换中的一个逆序对 表示为位置对 2 4 或元素对 5 2 这个置换的逆序 使用基于位置表示法表示为 1 3 1 4 2 3 2 4 和 2 5 或者使用基于元素表示法表示为 3 1 3 2 5 1 5 2 和 5 4 目录 1 定義 1 1 逆序 1 2 逆序數 1 3 逆序有關的向量 2 範例 四個元素的全部排列 3 排列的弱次序 4 参见 5 引用 5 1 参考书目 5 2 延伸阅读 5 3 预排序度测度定義 编辑逆序 编辑 nbsp 一个四元素置换的从基于位置逆序到基于元素逆序的映射 設 p displaystyle pi nbsp 為一個排列 如果 i lt j displaystyle i lt j nbsp 而且 p i gt p j displaystyle pi i gt pi j nbsp 這個位置 有称为 序位 对 i j displaystyle i j nbsp 1 2 或者這个元素对 p i p j displaystyle bigl pi i pi j bigr nbsp 3 4 5 被稱為是 p displaystyle pi nbsp 的一個逆序 逆序集是所有逆序的集合 一個排列 p displaystyle pi nbsp 的使用基于位置表示法的逆序集 相同于其反向排列 p 1 displaystyle pi 1 nbsp 的使用基于元素表示法的逆序集 只有每个有序对的两个分量交換位置 反之亦然 6 通常逆序是對於排列的定義 但也可以用於序列 設 S displaystyle S nbsp 是一個序列 或多重集排列 7 如果 i lt j displaystyle i lt j nbsp 而且 S i gt S j displaystyle S i gt S j nbsp 這個位置对 i j displaystyle i j nbsp 7 8 或者這个元素对 S i S j displaystyle bigl S i S j bigr nbsp 9 被稱為是 S displaystyle S nbsp 的一個逆序 對於序列 根據基于元素定义的逆序不是唯一性的 因為不同的位置对上可能有相同的值對 逆序數 编辑 序列 X x 1 x n displaystyle X langle x 1 dots x n rangle nbsp 的逆序數 i n v X displaystyle mathtt inv X nbsp 10 是逆序集的势 它常用於量度排列 5 或序列 9 的已排序程度 有时叫做预排序度presortedness 逆序数在 0 displaystyle 0 nbsp 至 n n 1 2 displaystyle frac n n 1 2 nbsp 之间 含二者 在一個排列的箭頭指向圖中 它是箭頭指向相交叉的數 6 也是從单位排列而得到的Kendall tau距離 英语 Kendall tau distance 以及每個与逆序有關的向量之和 它们在后面章节中定義 對於逆序數 基于位置与基于元素定義之间的分別並不重要 因為排列及其反向排列都具有相同的逆序數 其它測量 預先 排序程度的方式 包括了為排好序列而從序列中可以刪除元素的最小數量 對序列所 運行 排序的次數和長度 每個元素在已排序位置之上的距離總和 Spearman footrule 以及排序過程中必需的最少交換次數 11 比較排序算法計算逆序數的時間為 O n log n displaystyle O n log n nbsp 12 目前求逆序对数目比较普遍的方法 是利用归并排序做到 O n log n displaystyle O n log n nbsp 的时间复杂度 也可以利用树状数组 线段树来实现这种基础功能 复杂度均为 O n log n displaystyle O n log n nbsp 逆序有關的向量 编辑 有三個類似的向量用於將排列的逆序 壓縮到能唯一確定它的这个向量中 它們通常被稱為逆序向量或Lehmer碼 英语 Lehmer code 这里的定义及公式来源于逆序 离散数学 本文將逆序向量記為 v displaystyle v nbsp 13 其它的兩個向量有時分別稱為 左 和 右 逆序向量 為了避免與前面的逆序向量混淆 本文將另兩個分別稱為 左逆序計數 l displaystyle l nbsp 和 右逆序計數 r displaystyle r nbsp 左逆序計數是以反向colexicographic次序的排列 14 右逆序計數則是以字典序的排列 nbsp Rothe图逆序向量 v displaystyle v nbsp 采用基于元素的定義 v i displaystyle v i nbsp 是有序对較小 右 分量為 i displaystyle i nbsp 的逆序數 3 v i displaystyle v i nbsp 是在 p displaystyle pi nbsp 之中于 i displaystyle i nbsp 之前 大于 i displaystyle i nbsp 的元素的數量 v i k k gt i p 1 k lt p 1 i displaystyle v i k mid k gt i land pi 1 k lt pi 1 i nbsp 其更符合直觉的定义方式为 v p i displaystyle v bigl pi i bigr nbsp 是在 p displaystyle pi nbsp 之中于 p i displaystyle pi i nbsp 之前 大于 p i displaystyle pi i nbsp 的元素的数量 v p i k k lt i p k gt p i l i displaystyle v bigl pi i bigr k mid k lt i land pi k gt pi i l i nbsp 后者定义也适用于没有反向对应者的序列 左逆序計數 l displaystyle l nbsp 采用基于位置的定義 l i displaystyle l i nbsp 是有序对較大 右 分量為 l i displaystyle l i nbsp 的逆序數 l i displaystyle l i nbsp 是在 p i displaystyle pi i nbsp 之中于 p i displaystyle pi i nbsp 之前 大于 p i displaystyle pi i nbsp 的元素的數量 l i k k lt i p k gt p i displaystyle l i left k mid k lt i land pi k gt pi i right nbsp 右逆序計數 r displaystyle r nbsp 通常稱為Lehmer碼 采用基于位置的定義 r i displaystyle r i nbsp 是有序对較小 左 分量為 i displaystyle i nbsp 的逆序數 r i displaystyle r i nbsp 是 p i displaystyle pi i nbsp 之中于 p i displaystyle pi i nbsp 之後 小于 p i displaystyle pi i nbsp 的元素的數量 r i k k gt i p k lt p i displaystyle r i k mid k gt i land pi k lt pi i nbsp l displaystyle l nbsp 和 v displaystyle v nbsp 之间的关系 v i l p 1 i displaystyle v i l bigl pi 1 i bigr nbsp l i v p i displaystyle l i v bigl pi i bigr nbsp l displaystyle l nbsp 的第一个数字和 v displaystyle v nbsp 的最后一个数字总是 0 displaystyle 0 nbsp 可以省略 Rothe圖可以協助找出 v displaystyle v nbsp 和 r displaystyle r nbsp Rothe 英语 Heinrich August Rothe 圖是以黑點來表示1的排列矩陣 每一個位置上若為逆序 通常以叉號表示 則在其右側與下方即有一點 r i displaystyle r i nbsp 是圖中第 i displaystyle i nbsp 列排列逆序的加總 而 v i displaystyle v i nbsp 是 i displaystyle i nbsp 欄中排列逆序的加總 排列矩陣的逆矩阵即是此矩陣的轉置矩陣 因此某一排列的 v displaystyle v nbsp 即是它轉置矩陣的 r displaystyle r nbsp 反之亦然 r displaystyle r nbsp 和 l displaystyle l nbsp 之间的关系 p i i r i l i displaystyle pi i i r i l i nbsp 範例 四個元素的全部排列 编辑 nbsp 四個元素的6種可能逆序下面可排序表顯示了四個元素的集合 它的逆序集會有不同位置的24種排列 逆序相關向量和逆序數 右欄是它的反向排列 用於以colex排序 可以看出 v displaystyle v nbsp 和 l displaystyle l nbsp 的位數總是相同 而 l displaystyle l nbsp 和 r displaystyle r nbsp 與位逆序集有關 最右側欄是排列左上右下對角線的總和 如三角形圖示 以及 r displaystyle r nbsp 是左下右上對角線的總和 配對在下降對角線中其右側都是 2 3 4 displaystyle 2 3 4 nbsp 組成 而在上升對角線中的左側都是 1 2 3 displaystyle 1 2 3 nbsp 組成 此表中 p displaystyle pi nbsp 的預設排序是反向colex次序 這與 l displaystyle l nbsp 的colex次序相同 p displaystyle pi nbsp 的字典序與 r displaystyle r nbsp 的字典序相同 用于比较的三個元素全部排列表012345 p displaystyle pi nbsp v displaystyle v nbsp l displaystyle l nbsp p b r displaystyle r nbsp 0 nbsp 123 321 000 0 00 000 0 00 nbsp 000 0 00 01 nbsp 213 312 100 0 01 010 0 10 nbsp 100 0 01 12 nbsp 132 231 010 0 10 100 0 01 nbsp 010 0 10 13 nbsp 312 213 110 0 11 110 0 11 nbsp 200 0 02 24 nbsp 231 132 200 0 02 200 0 02 nbsp 110 0 11 25 nbsp 321 123 210 0 12 210 0 12 nbsp 210 0 12 301234567891011121314151617181920212223 p displaystyle pi nbsp v displaystyle v nbsp l displaystyle l nbsp p b r displaystyle r nbsp 0 nbsp 1234 4321 0000 0 000 0000 0 000 nbsp 0000 0 000 01 nbsp 2134 4312 1000 0 001 0010 0 100 nbsp 1000 0 001 12 nbsp 1324 4231 0100 0 010 0100 0 010 nbsp 0100 0 010 13 nbsp 3124 4213 1100 0 011 0110 0 110 nbsp 2000 0 002 24 nbsp 2314 4132 2000 0 002 0200 0 020 nbsp 1100 0 011 25 nbsp 3214 4123 2100 0 012 0210 0 120 nbsp 2100 0 012 36 nbsp 1243 3421 0010 0 100 1000 0 001 nbsp 0010 0 100 17 nbsp 2143 3412 1010 0 101 1010 0 101 nbsp 1010 0 101 28 nbsp 1423 3241 0110 0 110 1100 0 011 nbsp 0200 0 020 29 nbsp 4123 3214 1110 0 111 1110 0 111 nbsp 3000 0 003 310 nbsp 2413 3142 2010 0 102 1200 0 021 nbsp 1200 0 021 311 nbsp 4213 3124 2110 0 112 1210 0 121 nbsp 3100 0 013 412 nbsp 1342 2431 0200 0 020 2000 0 002 nbsp 0110 0 110 213 nbsp 3142 2413 1200 0 021 2010 0 102 nbsp 2010 0 102 314 nbsp 1432 2341 0210 0 120 2100 0 012 nbsp 0210 0 120 315 nbsp 4132 2314 1210 0 121 2110 0 112 nbsp 3010 0 103 416 nbsp 3412 2143 2200 0 022 2200 0 022 nbsp 2200 0 022 417 nbsp 4312 2134 2210 0 122 2210 0 122 nbsp 3200 0 023 518 nbsp 2341 1432 3000 0 003 3000 0 003 nbsp 1110 0 111 319 nbsp 3241 1423 3100 0 013 3010 0 103 nbsp 2110 0 112 420 nbsp 2431 1342 3010 0 103 3100 0 013 nbsp 1210 0 121 421 nbsp 4231 1324 3110 0 113 3110 0 113 nbsp 3110 0 113 522 nbsp 3421 1243 3200 0 023 3200 0 023 nbsp 2210 0 122 523 nbsp 4321 1234 3210 0 123 3210 0 123 nbsp 3210 0 123 6排列的弱次序 编辑 nbsp 对称群的Permutohedron S4n物品排列的集合其部份次序的結構 稱為排列的弱次序 而構成格 以逆序集的子集關係繪出的哈斯圖 則構成了稱為permutohedron的骨架 如果依位置將某一排列分配給每個逆序集 所得到的排序是permutohedron的次序 其中的邊對應於連續兩元素的交換 這是排列的弱排序 The identity is its minimum and the permutation formed by reversing the identity is its maximum 如果依元素將某一排列分配給每個逆序集 所得到的排序將是凱萊圖的次序 其中的邊對應於連續兩元素的交換 對稱組的凱萊圖與其permutohedron相似 但是每個排列由其反向替換 参见 编辑維基學院中的相關研究或學習資源 逆序对阶乘进制 置换群 置换的奇偶性引用 编辑 Aigner 2007 第27頁 Comtet 1974 第237頁 3 0 3 1 Knuth 1973 第11頁 Pemmaraju amp Skiena 2003 第69頁 5 0 5 1 Vitter amp Flajolet 1990 第459頁 6 0 6 1 Gratzer 2016 第221頁 7 0 7 1 Bona 2012 第57頁 Cormen et al 2001 第39頁 9 0 9 1 Barth amp Mutzel 2004 第183頁 Mannila 1985 Mahmoud 2000 第284頁 Kleinberg amp Tardos 2005 第225頁 Weisstein Eric W Inversion Vector From MathWorld A Wolfram Web Resource Reverse colex order of finitary permutations OEIS數列A055089 参考书目 编辑 Aigner Martin Word Representation A course in enumeration Berlin New York Springer 2007 ISBN 978 3642072536 Barth Wilhelm Mutzel Petra Simple and Efficient Bilayer Cross Counting Journal of Graph Algorithms and Applications 2004 8 2 179 194 doi 10 7155 jgaa 00088 nbsp Bona Miklos 2 2 Inversions in Permutations of Multisets Combinatorics of permutations Boca Raton FL CRC Press 2012 ISBN 978 1439850510 Comtet Louis 6 4 Inversions of a permutation of n Advanced combinatorics the art of finite and infinite expansions Dordrecht Boston D Reidel Pub Co 1974 ISBN 9027704414 Cormen Thomas H Leiserson Charles E Rivest Ronald L Stein Clifford Introduction to Algorithms 2nd MIT Press and McGraw Hill 2001 ISBN 0 262 53196 8 Gratzer George 7 2 Basic objects Lattice theory special topics and applications Cham Switzerland Birkhauser 2016 ISBN 978 3319442358 Kleinberg Jon Tardos Eva Algorithm Design 2005 ISBN 0 321 29535 8 Knuth Donald 5 1 1 Inversions The Art of Computer Programming Addison Wesley Pub Co 1973 ISBN 0201896850 Mahmoud Hosam Mahmoud Sorting Nonrandom Data Sorting a distribution theory Wiley Interscience series in discrete mathematics and optimization 54 Wiley IEEE 2000 ISBN 978 0 471 32710 3 Pemmaraju Sriram V Skiena Steven S Permutations and combinations Computational discrete mathematics combinatorics and graph theory with Mathematica Cambridge University Press 2003 ISBN 978 0 521 80686 2 Vitter J S Flajolet Ph Average Case Analysis of Algorithms and Data Structures van Leeuwen Jan 编 Algorithms and Complexity 1 2nd Elsevier 1990 ISBN 978 0 444 88071 0 延伸阅读 编辑 Margolius Barbara H Permutations with Inversions Journal of Integer Sequences 2001 4 预排序度测度 编辑 Mannila Heikki Measures of presortedness and optimal sorting algorithms IEEE Transactions on Computers April 1985 C 34 4 318 325 doi 10 1109 tc 1985 5009382 Estivill Castro Vladimir Wood Derick A new measure of presortedness Information and Computation 1989 83 1 111 119 doi 10 1016 0890 5401 89 90050 3 nbsp Skiena Steven S Encroaching lists as a measure of presortedness BIT 1988 28 4 755 784 S2CID 33967672 doi 10 1007 bf01954897 取自 https zh wikipedia org w index php title 逆序对 amp oldid 77506477, 维基百科,wiki,书籍,书籍,图书馆,

文章

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