TY - JOUR

T1 - Algorithms for Jumbled Indexing, Jumbled Border and Jumbled Square on run-length encoded strings

AU - Amir, Amihood

AU - Apostolico, Alberto

AU - Hirst, Tirza

AU - Landau, Gad M.

AU - Lewenstein, Noa

AU - Rozenberg, Liat

N1 - Publisher Copyright:
© 2016 Elsevier B.V.

PY - 2016/12/20

Y1 - 2016/12/20

N2 - In this paper we investigate jumbled (Abelian) versions of three classical strings problems. In all these problems we assume the input string S[1.n] is given in its run-length format S′[1.r]. The Jumbled Indexing problem is the problem of indexing a string S′[1.r] over |Σ| for histogram queries, i.e. given a pattern P, we want to find all substrings of S that are permutations of P. We provide an algorithm that constructs an index of size O(r2|Σ|) in time O(r2(logr+|Σ|log|Σ|)), which allows answering histogram queries in O(|Σ|3logr)-time. The Jumbled Border problem is the problem of finding for every location j in S, the longest proper prefix of S[1.j] that is also a permutation of a proper suffix of S[1.j], if such exists. We provide an algorithm that solves this problem in O(|Σ|(r2+n)) time, and O(|Σ|n) space. A Jumbled Square is a string of the form xx¯, where x¯ is a permutation of x. The Jumbled Square problem is the problem of finding for every location j in S, the longest jumbled square that ends in j, if such exists. We provide an algorithm that solves this problem in O(|Σ|(r2+n)) time, and O(|Σ|n) space.

AB - In this paper we investigate jumbled (Abelian) versions of three classical strings problems. In all these problems we assume the input string S[1.n] is given in its run-length format S′[1.r]. The Jumbled Indexing problem is the problem of indexing a string S′[1.r] over |Σ| for histogram queries, i.e. given a pattern P, we want to find all substrings of S that are permutations of P. We provide an algorithm that constructs an index of size O(r2|Σ|) in time O(r2(logr+|Σ|log|Σ|)), which allows answering histogram queries in O(|Σ|3logr)-time. The Jumbled Border problem is the problem of finding for every location j in S, the longest proper prefix of S[1.j] that is also a permutation of a proper suffix of S[1.j], if such exists. We provide an algorithm that solves this problem in O(|Σ|(r2+n)) time, and O(|Σ|n) space. A Jumbled Square is a string of the form xx¯, where x¯ is a permutation of x. The Jumbled Square problem is the problem of finding for every location j in S, the longest jumbled square that ends in j, if such exists. We provide an algorithm that solves this problem in O(|Σ|(r2+n)) time, and O(|Σ|n) space.

KW - Abelian border

KW - Abelian square

KW - Jumbled Indexing

KW - Pattern Matching

KW - String algorithms

UR - http://www.scopus.com/inward/record.url?scp=84975525640&partnerID=8YFLogxK

U2 - 10.1016/j.tcs.2016.04.030

DO - 10.1016/j.tcs.2016.04.030

M3 - ???researchoutput.researchoutputtypes.contributiontojournal.article???

AN - SCOPUS:84975525640

SN - 0304-3975

VL - 656

SP - 146

EP - 159

JO - Theoretical Computer Science

JF - Theoretical Computer Science

ER -