篇名 | Using Ordinal Representation for Generating Permutations with a Fixed Number of Inversions in Lexicographic Order |
---|---|
卷期 | 19:4 |
作者 | Kuo, Ting |
頁次 | 001-007 |
關鍵字 | inversion 、 lexicographic order 、 ordinal representation 、 permutation 、 EI 、 MEDLINE 、 Scopus |
出刊日期 | 200901 |
An inversion occurs between a pair of (π(subscript j), π(subscript k)) in a permutation π=(π1π2…π(subscript n)) of {1, 2,…, n}, if jπ(subscript k). By using a new representation scheme of permutations, called ordinal representation, we propose an algorithm for generating, in lexicographic order, the set of all permutations of {1, 2,…, n} with a fixed number of inversions m, where 0≤m≥C(superscript n subscript 2) Then, we derive a theorem that can be used to guarantee that the proposed algorithm is optimal, meaning that it will never visit any of the unqualified permutations. The beauty of the new representation scheme lies not in the result itself, but rather in its arithmetical ability and its wide applicability