## Abstract

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 log^{4} n) expected time a data structure of O(n log^{3} n) space that answers such queries in O(log^{3} n) time per query. After some trivial modifications, our approach can also support the case of single letter insertions or deletions in S.

Original language | English |
---|---|

Title of host publication | String Processing and Information Retrieval - 24th International Symposium, SPIRE 2017, Proceedings |

Editors | Rossano Venturini, Gabriele Fici, Marinella Sciortino |

Publisher | Springer Verlag |

Pages | 14-26 |

Number of pages | 13 |

ISBN (Print) | 9783319674278 |

DOIs | |

State | Published - 2017 |

Event | 24th International Symposium on String Processing and Information Retrieval, SPIRE 2017 - Palermo, Italy Duration: 26 Sep 2017 → 29 Sep 2017 |

### Publication series

Name | Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) |
---|---|

Volume | 10508 LNCS |

ISSN (Print) | 0302-9743 |

ISSN (Electronic) | 1611-3349 |

### Conference

Conference | 24th International Symposium on String Processing and Information Retrieval, SPIRE 2017 |
---|---|

Country/Territory | Italy |

City | Palermo |

Period | 26/09/17 → 29/09/17 |

### Bibliographical note

Publisher Copyright:© Springer International Publishing AG 2017.

## Keywords

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