Skip to main content
QUICK REVIEW

[论文解读] Methods of computing deque sortable permutations given complete and incomplete information

Daniel Denton|arXiv (Cornell University)|Aug 7, 2012
Advanced Combinatorial Mathematics参考文献 4被引用 3
一句话总结

本文识别并修正了Rosenstiehl与Tarjan于1982年提出的线性时间算法在判断排列的双端队列可排序性方面的缺陷。该文提出一种新的动态规划算法,可在O(n⁵2ⁿ)时间内计算双端队列可排序及并行栈可排序排列的数量,使计算范围扩展至n=21——远超此前n=14的限制。研究还表明,当信息不完整(例如按张输入卡片)时,某些可排序排列可能无法被正确排序。

ABSTRACT

The problem of determining which permutations can be sorted using certain switchyard networks dates back to Knuth in 1968. In this work, we are interested in permutations which are sortable on a double-ended queue (called a deque), or on two parallel stacks. In 1982, Rosenstiehl and Tarjan presented an O(n) algorithm for testing whether a given permutation was sortable on parallel stacks. In the same paper, they also presented a modification giving O(n) test for sortability on a deque. We demonstrate a slight error in the version of their algorithm for testing deque sortability, and present a fix for this problem. The general enumeration problem for both of these classes of permutations remains unsolved. What is known is that the growth rate of both classes is approximately Theta(8^n), so computing the number of sortable permutations of length n, even for small values of n, is difficult to do using any method that must evaluate each sortable permutation individually. As far as we know, the number of deque sortable permutations was known only up to n=14. This was computed using algorithms which effectively generate all sortable permutations. By using the symmetries inherent in the execution of Tarjan's algorithm, we have developed a new dynamic programming algorithm which can count the number of sortable permutations in both classes in O(n^5 2^n) time, allowing the calculation of the number of deque and parallel stack sortable permutation for much higher values of n than was previously possible.

研究动机与目标

  • 识别并修正Rosenstiehl与Tarjan的O(n)算法在判断双端队列可排序性时此前未被发现的错误。
  • 开发一种高效算法,用于计算超过先前n=14限制的双端队列可排序及并行栈可排序排列的数量。
  • 分析不完整信息对双端队列排序的影响,特别是当输入元素逐张揭示且缺乏全知信息时。
  • 确定在信息不完整条件下与信息完整条件下的最优排序策略是否存在差异。

提出的方法

  • 识别原始Rosenstiehl-Tarjan双端队列可排序性算法中的缺陷,尤其在于其对某些栈状态转换的处理方式。
  • 提出该算法的修正版本,并通过形式化证明确保其正确性,从而准确判断双端队列可排序排列。
  • 设计一种新颖的动态规划方法,利用Tarjan算法中的对称性,高效计算可排序排列的数量。
  • 利用栈操作与状态转换的对称性,减少冗余计算,实现O(n⁵2ⁿ)的时间复杂度。
  • 实现一种持久化数据结构,以模拟并比较在信息不完整条件下的排序决策。
  • 采用带记忆化的递归枚举策略,计算n=21以内的可排序排列数量。

实验结果

研究问题

  • RQ1Rosenstiehl-Tarjan的双端队列可排序性算法是否存在缺陷?若存在,其性质与影响为何?
  • RQ2能否高效计算出超过先前已知n=14限制的双端队列可排序排列数量?
  • RQ3当可获得全部输入信息与仅逐张输入元素时,最优排序策略是否存在差异?
  • RQ4是否存在理论上可双端队列排序的排列,但在信息不完整条件下无法被排序?
  • RQ5能否利用Tarjan算法中的对称性,设计出更快的可排序排列计数算法?

主要发现

  • 本文识别出Rosenstiehl-Tarjan双端队列可排序性算法中此前未知的缺陷,该缺陷会影响某些输入下算法输出的正确性。
  • 已对修正后的算法进行形式化证明,确认其正确性,从而解决了已识别的缺陷。
  • 新提出的动态规划算法可计算出n=21以内双端队列可排序排列的数量,将已知序列扩展至此前n=14的限制之外。
  • 长度为21的双端队列可排序排列数量为51,069,582,此数值此前未知。
  • 长度为22的并行栈可排序排列数量为7,258,100,272,108,212,此为首次计算得出。
  • 当n≤12时,在信息不完整条件下(基于未来可获胜情景的选择策略)与全知信息下的策略一致,表明小规模情况下无策略差异。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。