Methods of computing deque sortable permutations given complete and incomplete information
This paper addresses permutations sortable on a deque or on two parallel stacks. It identifies and corrects a subtle error in Rosenstiehl and Tarjan's O(n) algorithm for testing deque sortability. The main contribution is a new dynamic programming algorithm that counts the number of sortable permutations for both classes in O(n^5 2^n) time, leveraging symmetries in Tarjan's algorithm. This enables computing the number of deque sortable permutations for significantly larger n than previously possible, where prior enumeration was limited to n=14. The growth rate of both classes is approximately Θ(8^n).

arXiv ·
· August 7, 2012