{"title":"Ranking and unranking restricted permutations","authors":"Peter Kagey","doi":"10.1016/j.dam.2024.05.010","DOIUrl":null,"url":null,"abstract":"<div><p>We provide computationally efficient methods for unranking derangements and ménage permutations. That is, we provide a polynomial-time algorithm to extract the <span><math><mi>k</mi></math></span>th such permutation under the lexicographic ordering. More generally, we show that there exists a polynomial-time algorithm for unranking words in lexicographic order whenever there exists a polynomial-time algorithm for counting the number of such words with a given prefix. We use rook theory to give a polynomial-time algorithm for counting the number of derangements and ménage permutations with a given prefix and in turn use this to give an unranking algorithm. This has applications to combinatorics, probability, modeling, and data compression.</p></div>","PeriodicalId":50573,"journal":{"name":"Discrete Applied Mathematics","volume":"355 ","pages":"Pages 247-261"},"PeriodicalIF":1.0000,"publicationDate":"2024-05-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Discrete Applied Mathematics","FirstCategoryId":"100","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0166218X24001914","RegionNum":3,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"MATHEMATICS, APPLIED","Score":null,"Total":0}
引用次数: 0
Abstract
We provide computationally efficient methods for unranking derangements and ménage permutations. That is, we provide a polynomial-time algorithm to extract the th such permutation under the lexicographic ordering. More generally, we show that there exists a polynomial-time algorithm for unranking words in lexicographic order whenever there exists a polynomial-time algorithm for counting the number of such words with a given prefix. We use rook theory to give a polynomial-time algorithm for counting the number of derangements and ménage permutations with a given prefix and in turn use this to give an unranking algorithm. This has applications to combinatorics, probability, modeling, and data compression.
我们提供了计算效率很高的方法,用于解排序错乱和ménage排列。也就是说,我们提供了一种多项式时间算法来提取词法排序下的第 k 个此类排列。更一般地说,我们证明,只要存在一种多项式时间算法来计算具有给定前缀的这类词的数量,就存在一种多项式时间算法来解除词序中的词排名。我们利用新词理论给出了一种多项式时间算法,用于计算带有给定前缀的出格和梅尼奇排列的数量,并反过来利用这种算法给出了一种解排序算法。这在组合学、概率论、建模和数据压缩方面都有应用。
期刊介绍:
The aim of Discrete Applied Mathematics is to bring together research papers in different areas of algorithmic and applicable discrete mathematics as well as applications of combinatorial mathematics to informatics and various areas of science and technology. Contributions presented to the journal can be research papers, short notes, surveys, and possibly research problems. The "Communications" section will be devoted to the fastest possible publication of recent research results that are checked and recommended for publication by a member of the Editorial Board. The journal will also publish a limited number of book announcements as well as proceedings of conferences. These proceedings will be fully refereed and adhere to the normal standards of the journal.
Potential authors are advised to view the journal and the open calls-for-papers of special issues before submitting their manuscripts. Only high-quality, original work that is within the scope of the journal or the targeted special issue will be considered.