77 research outputs found

    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

    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

    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

    An Algorithm to Enumerate Grid Signed Permutation Classes

    Full text link
    In this paper, we present an algorithm that enumerates a certain class of signed permutations, referred to as grid signed permutation classes. In the case of permutations, the corresponding grid classes are of interest because they are equivalent to the permutation classes that can be enumerated by polynomials. Furthermore, we apply our results to genome rearrangements and establish that the number of signed permutations with fixed prefix reversal and reversal distance is given by polynomials that can be computed by our algorithm.Comment: Corrected typos and extended some explanations. Final version included in the Proceedings of The International Symposium on Symbolic and Algebraic Computation, ISSAC 202

    On the effective and automatic enumeration of polynomial permutation classes

    Full text link
    We describe an algorithm, implemented in Python, which can enumerate any permutation class with polynomial enumeration from a structural description of the class. In particular, this allows us to find formulas for the number of permutations of length n which can be obtained by a finite number of block sorting operations (e.g., reversals, block transpositions, cut-and-paste moves)

    Reversal Distances for Strings with Few Blocks or Small Alphabets

    Get PDF
    International audienceWe study the String Reversal Distance problem, an extension of the well-known Sorting by Reversals problem. String Reversal Distance takes two strings S and T as input, and asks for a minimum number of reversals to obtain T from S. We consider four variants: String Reversal Distance, String Prefix Reversal Distance (in which any reversal must include the first letter of the string), and the signed variants of these problems, namely Signed String Reversal Distance and Signed String Prefix Reversal Distance. We study algorithmic properties of these four problems, in connection with two parameters of the input strings: the number of blocks they contain (a block being maximal substring such that all letters in the substring are equal), and the alphabet size Σ. For instance, we show that Signed String Reversal Distance and Signed String Prefix Reversal Distance are NP-hard even if the input strings have only one letter

    Lower bounding edit distances between permutations

    Get PDF
    International audienceA number of fields, including the study of genome rearrangements and the design of interconnection networks, deal with the connected problems of sorting permutations in "as few moves as possible", using a given set of allowed operations, or computing the number of moves the sorting process requires, often referred to as the distance of the permutation. These operations often act on just one or two segments of the permutation, e.g. by reversing one segment or exchanging two segments. The cycle graph of the permutation to sort is a fundamental tool in the theory of genome rearrangements, and has proved useful in settling the complexity of many variants of the above problems. In this paper, we present an algebraic reinterpretation of the cycle graph of a permutation π as an even permutation π, and show how to reformulate our sorting problems in terms of particular factorisations of the latter permutation. Using our framework, we recover known results in a simple and unified way, and obtain a new lower bound on the prefix transposition distance (where a prefix transposition displaces the initial segment of a permutation), which is shown to outperform previous results. Moreover, we use our approach to improve the best known lower bound on the prefix transposition diameter from 2n/3 to ⌊3n/4⌋, and investigate a few relations between some statistics on π and π
    • …
    corecore