A data structure for substring-substring LCS length queries

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)


The longest common subsequence (LCS) length of two strings is used as one of the most fundamental metrics measuring the similarity between the strings. To find out the local structures common to the strings under this similarity metric, we need a fast calculation of the LCS length of any pair of substrings of the two strings. For supporting such queries, it makes sense to preprocess the two strings in a quadratic time, because it takes about the same amount of time to compute the LCS length of the entire strings from scratch. We propose a quadratic-time constructible data structure that supports sublinear-time queries of the LCS length for any pair of substrings. The query time is O(llog1+ϵ⁡l), where ϵ is a positive constant arbitrarily small and l is the sum of the substring lengths.

Original languageEnglish
Pages (from-to)41-54
Number of pages14
JournalTheoretical Computer Science
Publication statusPublished - 2022 Apr 8


  • Algorithms
  • Longest common subsequence
  • Semi-local string comparison

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)


Dive into the research topics of 'A data structure for substring-substring LCS length queries'. Together they form a unique fingerprint.

Cite this