126 research outputs found
Average number of flips in pancake sorting
We are given a stack of pancakes of different sizes and the only allowed
operation is to take several pancakes from top and flip them. The unburnt
version requires the pancakes to be sorted by their sizes at the end, while in
the burnt version they additionally need to be oriented burnt-side down. We
present an algorithm with the average number of flips, needed to sort a stack
of n burnt pancakes, equal to 7n/4+O(1) and a randomized algorithm for the
unburnt version with at most 17n/12+O(1) flips on average.
In addition, we show that in the burnt version, the average number of flips
of any algorithm is at least n+\Omega(n/log n) and conjecture that some
algorithm can reach n+\Theta(n/log n).
We also slightly increase the lower bound on g(n), the minimum number of
flips needed to sort the worst stack of n burnt pancakes. This bound, together
with the upper bound found by Heydari and Sudborough in 1997, gives the exact
number of flips to sort the previously conjectured worst stack -I_n for n=3 mod
4 and n>=15. Finally we present exact values of f(n) up to n=19 and of g(n) up
to n=17 and disprove a conjecture of Cohen and Blum by showing that the burnt
stack -I_{15} is not the worst one for n=15.Comment: 21 pages, new computational results for unburnt pancakes (up to n=19
Pancake Flipping is Hard
Pancake Flipping is the problem of sorting a stack of pancakes of different
sizes (that is, a permutation), when the only allowed operation is to insert a
spatula anywhere in the stack and to flip the pancakes above it (that is, to
perform a prefix reversal). In the burnt variant, one side of each pancake is
marked as burnt, and it is required to finish with all pancakes having the
burnt side down. Computing the optimal scenario for any stack of pancakes and
determining the worst-case stack for any stack size have been challenges over
more than three decades. Beyond being an intriguing combinatorial problem in
itself, it also yields applications, e.g. in parallel computing and
computational biology. In this paper, we show that the Pancake Flipping
problem, in its original (unburnt) variant, is NP-hard, thus answering the
long-standing question of its computational complexity.Comment: Corrected reference
On the number of pancake stacks requiring four flips to be sorted
Using existing classification results for the 7- and 8-cycles in the pancake
graph, we determine the number of permutations that require 4 pancake flips
(prefix reversals) to be sorted. A similar characterization of the 8-cycles in
the burnt pancake graph, due to the authors, is used to derive a formula for
the number of signed permutations requiring 4 (burnt) pancake flips to be
sorted. We furthermore provide an analogous characterization of the 9-cycles in
the burnt pancake graph. Finally we present numerical evidence that polynomial
formulae exist giving the number of signed permutations that require flips
to be sorted, with .Comment: We have finalized for the paper for publication in DMTCS, updated a
reference to its published version, moved the abstract to its proper
location, and added a thank you to the referees. The paper has 27 pages, 6
figures, and 2 table
Cycles in the burnt pancake graphs
The pancake graph is the Cayley graph of the symmetric group on
elements generated by prefix reversals. has been shown to have
properties that makes it a useful network scheme for parallel processors. For
example, it is -regular, vertex-transitive, and one can embed cycles in
it of length with . The burnt pancake graph ,
which is the Cayley graph of the group of signed permutations using
prefix reversals as generators, has similar properties. Indeed, is
-regular and vertex-transitive. In this paper, we show that has every
cycle of length with . The proof given is a
constructive one that utilizes the recursive structure of . We also
present a complete characterization of all the -cycles in for , which are the smallest cycles embeddable in , by presenting their
canonical forms as products of the prefix reversal generators.Comment: Added a reference, clarified some definitions, fixed some typos. 42
pages, 9 figures, 20 pages of appendice
A new general family of mixed graphs
A new general family of mixed graphs is presented, which generalizes both the pancake graphs and the cycle prefix digraphs. The obtained graphs are vertex transitive and, for some values of the parameters, they constitute the best infinite families with asymptotically optimal (or quasi-optimal) diameter for their number of verticesPeer ReviewedPostprint (author's final draft
- …