4 research outputs found
Computing Covers under Substring Consistent Equivalence Relations
Covers are a kind of quasiperiodicity in strings. A string is a cover of
another string if any position of is inside some occurrence of in
. The shortest and longest cover arrays of have the lengths of the
shortest and longest covers of each prefix of , respectively. The literature
has proposed linear-time algorithms computing longest and shortest cover arrays
taking border arrays as input. An equivalence relation over strings
is called a substring consistent equivalence relation (SCER) iff
implies (1) and (2) for all . In this paper, we generalize the notion of covers for SCERs and prove
that existing algorithms to compute the shortest cover array and the longest
cover array of a string under the identity relation will work for any SCERs
taking the accordingly generalized border arrays.Comment: 16 page
Quasi-Periodicity in Streams
In this work, we show two streaming algorithms for computing the length of the shortest cover of a string of length n. We start by showing a two-pass algorithm that uses O(log^2 n) space and then show a one-pass streaming algorithm that uses O(sqrt{n log n}) space. Both algorithms run in near-linear time. The algorithms are randomized and compute the answer incorrectly with probability inverse-polynomial in n. We also show that there is no sublinear-space streaming algorithm for computing the length of the shortest seed of a string
On left and right seeds of a string
AbstractWe consider the problem of finding the repetitive structure of a given string y of length n. A factor u of y is a cover of y, if every letter of y lies within some occurrence of u in y. A string v is a seed of y, if it is a cover of a superstring of y. A left seed of y is a prefix of y, that is a cover of a superstring of y. Similarly, a right seed of y is a suffix of y, that is a cover of a superstring of y. An integer array LS is the minimal left-seed (resp. maximal left-seed) array of y, if LS[i] is the minimal (resp. maximal) length of left seeds of y[0..i]. The minimal right-seed (resp. maximal right-seed) array RS of y is defined in a similar fashion.In this article, we present linear-time algorithms for computing all left and right seeds of y, a linear-time algorithm for computing the minimal left-seed array of y, a linear-time solution for computing the maximal left-seed array of y, an O(nlogn)-time algorithm for computing the minimal right-seed array of y, and a linear-time solution for computing the maximal right-seed array of y. All algorithms use linear auxiliary space