Skip to main content

Prefix and Suffix Reversals on Strings

  • Conference paper
  • First Online:
String Processing and Information Retrieval (SPIRE 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9309))

Included in the following conference series:

  • International Symposium on String Processing and Information Retrieval

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

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Chapter  Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. Christie, D.: Genome Rearrangement Problems. Ph.D. thesis, University of Glasgow (1998)

    Google Scholar 

  5. Christie, D.A., Irving, R.W.: Sorting strings by reversals and by transpositions. SIAM J. Discret. Math. 14(2), 193–206 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  6. Fertin, G., Labarre, A., Rusu, I., Tannier, E., Vialette, S.: Combinatorics of Genome Rearrangements. Computational Molecular Biology. MIT Press (2009)

    Google Scholar 

  7. Garey, M.R., Johnson, D.S.: Computers and Intractability; A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., New York (1990)

    Google Scholar 

  8. Hannenhalli, S., Pevzner, P.A.: Transforming cabbage into turnip: Polynomial algorithm for sorting signed permutations by reversals. J. ACM 46(1), 1–27 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  9. 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)

    Article  MathSciNet  MATH  Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. 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)

    Google Scholar 

  12. Radcliffe, A.J., Scott, A.D., Wilmer, E.L.: Reversals and transpositions over finite alphabets. SIAM J. Discret. Math. (2005)

    Google Scholar 

  13. Rahman, M.K., Rahman, M.S.: Prefix and suffix transreversals on binary and ternary strings. Journal of Discrete Algorithms 33, 160–170 (2015)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Guillaume Fertin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics