44 research outputs found

    Average number of flips in pancake sorting

    Get PDF
    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

    Short Proofs for Cut-and-Paste Sorting of Permutations

    Full text link
    We consider the problem of determining the maximum number of moves required to sort a permutation of [n][n] using cut-and-paste operations, in which a segment is cut out and then pasted into the remaining string, possibly reversed. We give short proofs that every permutation of [n][n] can be transformed to the identity in at most \flr{2n/3} such moves and that some permutations require at least \flr{n/2} moves.Comment: 7 pages, 2 figure

    Polynomial-time sortable stacks of burnt pancakes

    Get PDF
    Pancake flipping, a famous open problem in computer science, can be formalised as the problem of sorting a permutation of positive integers using as few prefix reversals as possible. In that context, a prefix reversal of length k reverses the order of the first k elements of the permutation. The burnt variant of pancake flipping involves permutations of signed integers, and reversals in that case not only reverse the order of elements but also invert their signs. Although three decades have now passed since the first works on these problems, neither their computational complexity nor the maximal number of prefix reversals needed to sort a permutation is yet known. In this work, we prove a new lower bound for sorting burnt pancakes, and show that an important class of permutations, known as "simple permutations", can be optimally sorted in polynomial time.Comment: Accepted pending minor revisio

    АСИМПТОТИЧЕСКОЕ ПОВЕДЕНИЕ РЕЗИСТОРНЫХ РАССТОЯНИЙ В ГРАФАХ КЭЛИ

    Get PDF
    In the present paper, we prove asymptotically exact bounds for resistance distances in families of Cayley graphs that either have a girth of more than 4 or are free of subgraphs K2,t, assuming that the growth function is at least subexponential, and either the diameter or the inverse value of the spectral gap are polynomial with respect to degrees of a graph.В настоящей работе доказаны асимптотически точные оценки для резисторных расстояний в некоторых семействах графов Кэли при условии, что функция роста является как минимум субэкспоненциальной, а диаметр либо обратная величина к спектральному пробелу полиномиальны по степени графа. 

    A new upper bound to (a variant of) the pancake problem

    Full text link
    The "pancake problem" asks how many prefix reversals are sufficient to sort any permutation πSk\pi \in \mathcal{S}_k to the identity. We write f(k)f(k) to denote this quantity. The best known bounds are that 1514kO(1)f(k)1811k+O(1)\frac{15}{14}k -O(1) \le f(k)\le \frac{18}{11}k+O(1). The proof of the upper bound is computer-assisted, and considers thousands of cases. We consider h(k)h(k), how many prefix and suffix reversals are sufficient to sort any πSk\pi \in \mathcal{S}_k. We observe that 1514kO(1)h(k)\frac{15}{14}k -O(1)\le h(k) still holds, and give a human proof that h(k)32k+O(1)h(k) \le \frac{3}{2}k +O(1). The constant "32\frac{3}{2}" is a natural barrier for the pancake problem and this variant, hence new techniques will be required to do better.Comment: 9 pages, comments welcome

    A new general family of mixed graphs

    Get PDF
    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

    Pancake Flipping is Hard

    Get PDF
    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
    corecore