Skip to main content

Compacting a Dynamic Edit Distance Table by RLE Compression

  • Conference paper
  • First Online:
SOFSEM 2016: Theory and Practice of Computer Science (SOFSEM 2016)

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

Abstract

Kim and Park [A dynamic edit distance table, J. Disc. Algo., 2:302–312, 2004] proposed a method (KP) based on a “dynamic edit distance table” that allows one to efficiently maintain edit distance information between two strings A of length m and B of length n when the strings can be modified by single-character edits to their left or right ends. This type of computation is useful e.g. in cyclic string comparison. KP uses linear time, \(O(m+n)\), to update the distance representation after each single edit. As noted in a recent extension of KP by Hyyrö et al. [Incremental string comparison, J. Disc. Algo., 34:2-17, 2015], a practical bottleneck is that the method needs \(\varTheta (mn)\) space to store a representation of a complete \(m \times n\) edit distance table. In this paper we take the first steps towards reducing the space usage by RLE compressing A and B. Let M and N be the lengths of RLE compressed versions of A and B, respectively. We propose how to store the edit distance table using \(\varTheta (mN + Mn)\) space while maintaining the same time complexity as the original method that does not use compression.

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 EPUB and 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

Notes

  1. 1.

    The case of right-to-left direction is symmetric and would within the context of this paper only result in interchanging the notions of “left” and “right” ends of a string.

  2. 2.

    Without loss of generality; the case of editing A is symmetric.

  3. 3.

    In case of using a linked representation of \( DR \) or \( DS \), the list should also contain pointers to the corresponding entries in column j.

References

  1. Arbell, O., Landau, G.M., Mitchell, J.S.: Edit distance of run-length encoded strings. Inf. Process. Lett. 83(6), 307–314 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  2. Barton, C., Iliopoulos, C.S., Pissis, S.P.: Average-case optimal approximate circular string matching. In: Dediu, A.-H., Formenti, E., Martín-Vide, C., Truthe, B. (eds.) LATA 2015. LNCS, vol. 8977, pp. 85–96. Springer, Heidelberg (2015)

    Google Scholar 

  3. Hsu, P., Chen, K., Chao, K.: Finding all approximate gapped palindromes. Int. J. Found. Comput. Sci. 21(6), 925–939 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  4. Hyyrö, H., Narisawa, K., Inenaga, S.: Dynamic edit distance table under a general weighted cost function. J. Disc. Algorithms 34, 2–17 (2015)

    Article  Google Scholar 

  5. Kim, S.R., Park, K.: A dynamic edit distance table. J. Disc. Algorithms 2, 302–312 (2004)

    Google Scholar 

  6. Landau, G.M., Myers, E.W., Schmidt, J.P.: Incremental string comparison. SIAM J. Comp. 27(2), 557–582 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  7. Schmidt, J.P.: All highest scoring paths in weighted grid graphs and their application in finding all approximate repeats in strings. SIAM J. Comp. 27(4), 972–992 (1998)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Heikki Hyyrö .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hyyrö, H., Inenaga, S. (2016). Compacting a Dynamic Edit Distance Table by RLE Compression. In: Freivalds, R., Engels, G., Catania, B. (eds) SOFSEM 2016: Theory and Practice of Computer Science. SOFSEM 2016. Lecture Notes in Computer Science(), vol 9587. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-49192-8_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-49192-8_25

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-49191-1

  • Online ISBN: 978-3-662-49192-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics