Binary Jumbled String Matching for Highly Run-Length Compressible Texts
Abstract
The Binary Jumbled String Matching problem is defined as: Given a string over of length and a query , with non-negative integers, decide whether has a substring with exactly 's and 's. Previous solutions created an index of size O(n) in a pre-processing step, which was then used to answer queries in constant time. The fastest algorithms for construction of this index have running time [Burcsi et al., FUN 2010; Moosa and Rahman, IPL 2010], or in the word-RAM model [Moosa and Rahman, JDA 2012]. We propose an index constructed directly from the run-length encoding of . The construction time of our index is , where O(n) is the time for computing the run-length encoding of and is the length of this encoding---this is no worse than previous solutions if and better if . Our index can be queried in time. While in the worst case, preliminary investigations have indicated that may often be close to . Furthermore, the algorithm for constructing the index is conceptually simple and easy to implement. In an attempt to shed light on the structure and size of our index, we characterize it in terms of the prefix normal forms of introduced in [Fici and Lipt\'ak, DLT 2011].
Cite
@article{arxiv.1206.2523,
title = {Binary Jumbled String Matching for Highly Run-Length Compressible Texts},
author = {Golnaz Badkobeh and Gabriele Fici and Steve Kroon and Zsuzsanna Lipták},
journal= {arXiv preprint arXiv:1206.2523},
year = {2013}
}
Comments
v2: only small cosmetic changes; v3: new title, weakened conjectures on size of Corner Index (we no longer conjecture it to be always linear in size of RLE); removed experimental part on random strings (these are valid but limited in their predictive power w.r.t. general strings); v3 published in IPL