Abstract
The Sorting by Prefix Reversals problem consists in sorting the elements of a given permutation \(\pi \) with a minimum number of prefix reversals, i.e. reversals that always imply the leftmost element of \(\pi \). A natural extension of this problem is to consider strings (in which any letter may appear several times) rather than permutations. In strings, three different types of problems arise: grouping (starting from a string S, transform it so that all identical letters are consecutive), sorting (a constrained version of grouping, in which the target string must be lexicographically ordered) and rearranging (given two strings S and T, transform S into T). In this paper, we study these three problems, under an algorithmic viewpoint, in the setting where two operations (rather than one) are allowed: namely, prefix and suffix reversals - where a suffix reversal must always imply the rightmost element of the string. We first give elements of comparison between the “prefix reversals only” case and our case. The algorithmic results we obtain on these three problems depend on the size k of the alphabet on which the strings are built. In particular, we show that the grouping problem is in P for \(k\in [2;4]\) and when \(n-k=O(1)\), where n is the length of the string. We also show that the grouping problem admits a PTAS for any constant k, and is 2-approximable for any k. Concerning sorting, it is in P for \(k\in [2;3]\), admits a PTAS for constant k, and is NP-hard for \(k=n\). Finally, concerning the rearranging problem, we show that it is NP-hard, both for \(k=O(1)\) and \(k=n\). We also show that the three problems are FPT when the parameter is the maximum number of blocks over the source and target strings.
Supported by GRIOTE project, funded by Région Pays de la Loire
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bulteau, L., Fertin, G., Rusu, I.: Pancake flipping is hard. In: Rovan, B., Sassone, V., Widmayer, P. (eds.) MFCS 2012. LNCS, vol. 7464, pp. 247–258. Springer, Heidelberg (2012)
Bulteau, L., Fertin, G., Komusiewicz, C.: Reversal distances for strings with few blocks or small alphabets. In: Kulikov, A.S., Kuznetsov, S.O., Pevzner, P. (eds.) CPM 2014. LNCS, vol. 8486, pp. 50–59. Springer, Heidelberg (2014)
Caprara, A.: Sorting by reversals is difficult. In: Proceedings of the First Annual International Conference on Computational Molecular Biology. RECOMB 1997, pp. 75–83. ACM, New York (1997)
Christie, D.: Genome Rearrangement Problems. Ph.D. thesis, University of Glasgow (1998)
Christie, D.A., Irving, R.W.: Sorting strings by reversals and by transpositions. SIAM J. Discret. Math. 14(2), 193–206 (2001)
Fertin, G., Labarre, A., Rusu, I., Tannier, E., Vialette, S.: Combinatorics of Genome Rearrangements. Computational Molecular Biology. MIT Press (2009)
Garey, M.R., Johnson, D.S.: Computers and Intractability; A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., New York (1990)
Hannenhalli, S., Pevzner, P.A.: Transforming cabbage into turnip: Polynomial algorithm for sorting signed permutations by reversals. J. ACM 46(1), 1–27 (1999)
Hurkens, C.A.J., van Iersel, L., Keijsper, J., Kelk, S., Stougie, L., Tromp, J.: Prefix reversals on binary and ternary strings. SIAM J. Discrete Math. 21(3), 592–611 (2007)
Lintzmayer, C.N., Dias, Z.: Sorting permutations by prefix and suffix versions of reversals and transpositions. In: Pardo, A., Viola, A. (eds.) LATIN 2014. LNCS, vol. 8392, pp. 671–682. Springer, Heidelberg (2014)
Lintzmayer, C.N., Dias, Z.: On the diameter of rearrangement problems. In: Dediu, A.-H., Martín-Vide, C., Truthe, B. (eds.) AlCoB 2014. LNCS, vol. 8542, pp. 158–170. Springer, Heidelberg (2014)
Radcliffe, A.J., Scott, A.D., Wilmer, E.L.: Reversals and transpositions over finite alphabets. SIAM J. Discret. Math. (2005)
Rahman, M.K., Rahman, M.S.: Prefix and suffix transreversals on binary and ternary strings. Journal of Discrete Algorithms 33, 160–170 (2015)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Fertin, G., Jankowiak, L., Jean, G. (2015). Prefix and Suffix Reversals on Strings. In: Iliopoulos, C., Puglisi, S., Yilmaz, E. (eds) String Processing and Information Retrieval. SPIRE 2015. Lecture Notes in Computer Science(), vol 9309. Springer, Cham. https://doi.org/10.1007/978-3-319-23826-5_17
Download citation
DOI: https://doi.org/10.1007/978-3-319-23826-5_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-23825-8
Online ISBN: 978-3-319-23826-5
eBook Packages: Computer ScienceComputer Science (R0)