18 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

    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

    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

    Hierarchical heuristic search revisited

    No full text
    Abstract. Pattern databases enable difficult search problems to be solved very quickly, but are large and time-consuming to build. They are therefore best suited to situations where many problem instances are to be solved, and less than ideal when only a few instances are to be solved. This paper examines a technique- hierarchical heuristic search-especially designed for the latter situation. The key idea is to compute, on demand, only those pattern database entries needed to solve a given problem instance. Our experiments show that Hierarchical IDA * can solve individual problems very quickly, up to two orders of magnitude faster than the time required to build an entire high-performance pattern database.

    Efficient Algorithms for Sorting k-Sets in Bins

    No full text
    corecore