Longest common factor after one edit operation

Amihood Amir, Panagiotis Charalampopoulos, Costas S. Iliopoulos, Solon P. Pissis, Jakub Radoszewski

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

16 Scopus citations


It is well known that the longest common factor (LCF) of two strings over an integer alphabet can be computed in time linear in the total length of the two strings. Our aim here is to present an algorithm that preprocesses two strings S and T in order to answer the following type of queries: Given a position i on S and a letter α, return an LCF of T and S′, where S′ is the string resulting from S after substituting S[i] with α. In what follows, we present an algorithm that, given two strings of length at most n, constructs in O(n log4 n) expected time a data structure of O(n log3 n) space that answers such queries in O(log3 n) time per query. After some trivial modifications, our approach can also support the case of single letter insertions or deletions in S.

Original languageEnglish
Title of host publicationString Processing and Information Retrieval - 24th International Symposium, SPIRE 2017, Proceedings
EditorsRossano Venturini, Gabriele Fici, Marinella Sciortino
PublisherSpringer Verlag
Number of pages13
ISBN (Print)9783319674278
StatePublished - 2017
Event24th International Symposium on String Processing and Information Retrieval, SPIRE 2017 - Palermo, Italy
Duration: 26 Sep 201729 Sep 2017

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume10508 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference24th International Symposium on String Processing and Information Retrieval, SPIRE 2017

Bibliographical note

Publisher Copyright:
© Springer International Publishing AG 2017.


  • Dynamic data structure
  • Heavy-path decomposition
  • Longest common factor
  • Orthogonal range searching
  • Suffix tree


Dive into the research topics of 'Longest common factor after one edit operation'. Together they form a unique fingerprint.

Cite this