Suffix tree-based linear algorithms for multiple prefixes, single suffix counting and listing problems

03/31/2022
by   Laurentius Leonard, et al.
0

Given two strings T and S and a set of strings P, for each string p ∈ P, consider the unique substrings of T that have p as their prefix and S as their suffix. Two problems then come to mind; the first problem being the counting of such substrings, and the second problem being the problem of listing all such substrings. In this paper, we describe linear-time, linear-space suffix tree-based algorithms for both problems. More specifically, we describe an O(|T| + |P|) time algorithm for the counting problem, and an O(|T| + |P| + #(ans)) time algorithm for the listing problem, where #(ans) refers to the number of strings being listed in total, and |P| refers to the total length of the strings in P. We also consider the reversed version of the problems, where one prefix condition string and multiple suffix condition strings are given instead, and similarly describe linear-time, linear-space algorithms to solve them.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/05/2023

Linear-time computation of generalized minimal absent words for multiple strings

A string w is called a minimal absent word (MAW) for a string S if w doe...
research
09/26/2022

Inferring strings from position heaps in linear time

Position heaps are index structures of text strings used for the exact s...
research
04/24/2022

String Rearrangement Inequalities and a Total Order Between Primitive Words

We study the following rearrangement problem: Given n words, rearrange a...
research
11/08/2022

Comparing Two Counting Methods for Estimating the Probabilities of Strings

There are two methods for counting the number of occurrences of a string...
research
05/20/2019

Prefix Block-Interchanges on Binary and Ternary Strings

The genome rearrangement problem computes the minimum number of operatio...
research
10/05/2022

Double-Ended Palindromic Trees: A Linear-Time Data Structure and Its Applications

The palindromic tree (a.k.a. eertree) is a linear-size data structure th...
research
07/09/2022

Online algorithms for finding distinct substrings with length and multiple prefix and suffix conditions

Let two static sequences of strings P and S, representing prefix and suf...

Please sign up or login with your details

Forgot password? Click here to reset