All-Pairs Suffix-Prefix on Fully Dynamic Set of Strings

Abstract

The all-pairs suffix-prefix (APSP) problem is a classical problem in string processing which has important applications in bioinformatics. Given a set S = \S1, …, Sk\ of k strings, the APSP problem asks one to compute the longest suffix of Si that is a prefix of Sj for all k2 ordered pairs Si, Sj of strings in S. In this paper, we consider the dynamic version of the APSP problem that allows for insertions of new strings to the set of strings. Our objective is, each time a new string Si arrives to the current set Si-1 = \S1, …, Si-1\ of i-1 strings, to compute (1) the longest suffix of Si that is a prefix of Sj and (2) the longest prefix of Si that is a suffix of Sj for all 1 ≤ j ≤ i. We propose an O(n)-space data structure which computes (1) and (2) in O(|Si| σ + i) time for each new given string Si, where n is the total length of the strings. Further, we show how to extend our methods to the fully dynamic version of the APSP problem allowing for both insertions and deletions of strings.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…