arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1208.1532math.COcs.DS
收藏

完全信息和不完全信息下双排可排序排列的计算方法

Methods of computing deque sortable permutations given complete and incomplete information

Daniel Denton

摘要:

确定哪些排列可以使用某些开关站网络排序的问题可以追溯到1968年的Knuth。在这项工作中,我们感兴趣的排列是可排序的双端队列(称为双端队列),或两个并行堆栈。1982年,Rosenstiehl和Tarjan提出了一个O(n)算法,用于测试给定的置换是否在并行堆栈上可排序。在同一篇论文中,他们还提出了一个修改,给出了O(n)的可排序性测试。我们展示了一个轻微的错误,在他们的算法版本测试双端可排序性,并提出了解决这个问题。这两类排列的一般计数问题仍然没有解决。已知的是,这两个类的增长率大约是Theta(8^n),所以计算长度为n的可排序排列的数量,即使是对于小的n值,也很难使用任何必须单独评估每个可排序排列的方法来完成。据我们所知,双排可排序排列的个数只知道n=14。这是使用有效地生成所有可排序排列的算法计算的。利用Tarjan算法执行中固有的对称性,我们开发了一种新的动态规划算法,它可以在O(n^5 2^n)时间内计算两类中可排序排列的数量,允许计算双端队列和并行堆栈的可排序排列的数量,n值比以前可能的要高得多。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑