Dynamic RLE-Compressed Edit Distance Tables under General Weighted Cost Functions

Heikki Hyyrö, Shunsuke Inenaga

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)


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 unit cost 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. Recently Hyyrö et al. [Incremental string comparison, J. Disc. Algo., 34:2-17, 2015] presented an efficient method for maintaining the dynamic edit distance table under general weighted edit distance, running in O(c(m + n)) time per single edit, where c is the maximum weight of the cost function. The work noted that the Θ(mn) space requirement, and not the running time, may be the main bottleneck in using the dynamic edit distance table. In this paper we take the first steps towards reducing the space usage of the dynamic edit distance table 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 dynamic edit distance table using Θ(mN + Mn) space while maintaining the same time complexity as the previous methods for uncompressed strings.

Original languageEnglish
Pages (from-to)623-645
Number of pages23
JournalInternational Journal of Foundations of Computer Science
Issue number4
Publication statusPublished - Jun 1 2018

All Science Journal Classification (ASJC) codes

  • Computer Science (miscellaneous)


Dive into the research topics of 'Dynamic RLE-Compressed Edit Distance Tables under General Weighted Cost Functions'. Together they form a unique fingerprint.

Cite this