146 research outputs found
Methods of computing deque sortable permutations given complete and incomplete information
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.Comment: dartmouth senior honors thesis advised by Peter Doyle and Scot
Drysdale 45 pages, 9 figure
Two Vignettes On Full Rook Placements
Using bijections between pattern-avoiding permutations and certain full rook
placements on Ferrers boards, we give short proofs of two enumerative results.
The first is a simplified enumeration of the 3124, 1234-avoiding permutations,
obtained recently by Callan via a complicated decomposition. The second is a
streamlined bijection between 1342-avoiding permutations and permutations which
can be sorted by two increasing stacks in series, originally due to Atkinson,
Murphy, and Ru\v{s}kuc.Comment: 9 pages, 4 figure
Sorting by shuffling methods and a queue
We consider sorting by a queue that can apply a permutation from a given set
over its content. This gives us a sorting device
corresponding to any shuffling method since every such method is
associated with a set of permutations. Two variations of these devices are
considered - and
. These require the entire content of the
device to be unloaded after a permutation is applied or unloaded by each pop
operation, respectively.
First, we show that sorting by a deque is equivalent to sorting by a queue
that can reverse its content. Next, we focus on sorting by cuts. We prove that
the set of permutations that one can sort by using
is the set of the -avoiding separable
permutations. We give lower and upper bounds to the maximum number of times the
device must be used to sort a permutation. Furthermore, we give a formula for
the number of -permutations, , that one
can sort by using , for any shuffling method
, such that the permutations associated with it are irreducible.
Next, we prove a generalization of the fact that
can sort all permutations. We also show
that is given by the odd indexed
Fibonacci numbers , for any shuffling method having a
specific back-front property. The rest of the work is dedicated to a surprising
conjecture inspired by Diaconis and Graham which states that one can sort the
same number of permutations of any given size by using the devices
and
, corresponding to the popular
In-shuffle and Monge shuffling methods.Comment: 29 pages, 7 figure
- …