Constant Time and Space Updates for the Sigma-Tau Problem

STRING PROCESSING AND INFORMATION RETRIEVAL, SPIRE 2023(2023)

引用 0|浏览4
暂无评分
摘要
Sawada and Williams in [SODA 2018] and [ACM Trans. Alg. 2020] gave algorithms for constructing Hamiltonian paths and cycles in the Sigma-Tau graph, thereby solving a problem of Nijenhuis and Wilf that had been open for over 40 years. The Sigma-Tau graph is the directed graph whose vertex set consists of all permutations of n, and there is a directed edge from pi to pi ' if p pi ' can be obtained from pi either by a cyclic left-shift (sigma) or by exchanging the first two entries (tau). We improve the existing algorithms from O(n) time per permutation to O(1) time per permutation. Moreover, our algorithms require only O(1) extra space. The result is the first combinatorial generation algorithm for n-permutations that is optimal in both time and space, and lists the objects in a Gray code order using only two types of changes. The simple C code (similar to 50 lines) can be found at https://github.com/fmasillo/sigma-tau.
更多
查看译文
关键词
permutations,sigma-tau problem,dynamic data structures,combinatorial generation,combinatorial Gray codes
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要