Skip to main content

Adjacent Swaps on Strings

  • Conference paper
Computing and Combinatorics (COCOON 2008)

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

Included in the following conference series:

Abstract

Transforming strings by exchanging elements at bounded distance is applicable in fields like molecular biology, pattern recognition and music theory. A reversal of length two at position i is denoted by (i i+1). When it is applied to π, where π = π 1,π 2, π 3,..., π i ,π i + 1, π n , it transforms π to π′, where π′ = π 1,π 2, π 3,..., π i − 1,π i + 1, π i , π i + 1, ..., π n . We call this operation an adjacent swap. We study the problem of computing the minimum number of adjacent swaps needed to transform one string of size n into another compatible string over an alphabet σ of size k, i.e. adjacent swap distance problem. O(nlog 2 n) time complexity algorithms are known for adjacent swap distance. We give an algorithm with O(nk) time for both signed and unsigned versions of this problem where k is the number of symbols. We also give an algorithm with O(nk) time for transforming signed strings with reversals of length up to 2, i.e. reversals of length 1 or 2.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. Chen, T., Skiena, S.S.: Sorting with Fixed-Length Reversals. Discrete Applied Mathematics 71, 269–295 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  2. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. 2nd edn. McGraw-Hill Book Company, Cambridge (2002)

    Google Scholar 

  3. Hannenhalli, S., Pevzner, P.A.: Transforming Cabbage into Turnip: Polynomial Algorithm for Sorting Signed Permutations by Reversals. Journal of the ACM 46(1), 1–27 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  4. Toussaint, G.: A Comparison of Rhythmic Similarity Measures. In: Proceedings of the Fifth International Conference on Music Information Retrieval, Barcelona, Spain (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Xiaodong Hu Jie Wang

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chitturi, B., Sudborough, H., Voit, W., Feng, X. (2008). Adjacent Swaps on Strings. In: Hu, X., Wang, J. (eds) Computing and Combinatorics. COCOON 2008. Lecture Notes in Computer Science, vol 5092. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69733-6_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69733-6_30

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69732-9

  • Online ISBN: 978-3-540-69733-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics