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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 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.
Without loss of generality; the case of editing A is symmetric.
- 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
Arbell, O., Landau, G.M., Mitchell, J.S.: Edit distance of run-length encoded strings. Inf. Process. Lett. 83(6), 307–314 (2002)
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)
Hsu, P., Chen, K., Chao, K.: Finding all approximate gapped palindromes. Int. J. Found. Comput. Sci. 21(6), 925–939 (2010)
Hyyrö, H., Narisawa, K., Inenaga, S.: Dynamic edit distance table under a general weighted cost function. J. Disc. Algorithms 34, 2–17 (2015)
Kim, S.R., Park, K.: A dynamic edit distance table. J. Disc. Algorithms 2, 302–312 (2004)
Landau, G.M., Myers, E.W., Schmidt, J.P.: Incremental string comparison. SIAM J. Comp. 27(2), 557–582 (1998)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)