Fast and Simple Jumbled Indexing for Binary Run-Length Encoded Strings

Important papers have appeared recently on the problem of indexing binary strings for jumbled pattern matching, and further lowering the time bounds in terms of the input size would now be a breakthrough with broad implications. We can still make progress on the problem, however, by considering other natural parameters. Badkobeh et al. (IPL, 2013) and Amir et al. (TCS, 2016) gave algorithms that index a binary string in O(n + r^2 log r) time, where n is the length and r is the number of runs, and Giaquinta and Grabowski (IPL, 2013) gave one that runs in O(n + r^2) time. In this paper we propose a new and very simple algorithm that also runs in O(n + r^2) time and can be extended either so that the index returns the position of a match (if there is one), or so that the algorithm uses only O(n) bits of space instead of O(n) words.

[1]  Mohammad Sohel Rahman,et al.  Indexing permutations for binary strings , 2010, Inf. Process. Lett..

[2]  Gad M. Landau,et al.  Algorithms for Jumbled Indexing, Jumbled Border and Jumbled Square on Run-Length Encoded Strings , 2014, SPIRE.

[3]  Szymon Grabowski,et al.  New algorithms for binary jumbled pattern matching , 2013, Inf. Process. Lett..

[4]  Alexandru I. Tomescu,et al.  Indexes for Jumbled Pattern Matching in Strings, Trees and Graphs , 2013, SPIRE.

[5]  Gonzalo Navarro,et al.  Compact Data Structures - A Practical Approach , 2016 .

[6]  Zsuzsanna Lipták,et al.  On Table Arrangements, Scrabble Freaks, and Jumbled Pattern Matching , 2010, FUN.

[7]  Raphael Yuster,et al.  Near Linear Time Construction of an Approximate Index for All Maximum Consecutive Sub-sums of a Sequence , 2012, CPM.

[8]  Moshe Lewenstein,et al.  On Hardness of Jumbled Indexing , 2014, ICALP.

[9]  Mohammad Sohel Rahman,et al.  Sub-quadratic time and linear space data structures for permutation matching in binary strings , 2012, J. Discrete Algorithms.

[10]  Wojciech Rytter,et al.  Efficient Indexes for Jumbled Pattern Matching with Constant-Sized Alphabet , 2013, ESA.

[11]  Gad M. Landau,et al.  Binary Jumbled Pattern Matching on Trees and Tree-Like Structures , 2013, ESA.

[12]  Zsuzsanna Lipták,et al.  Binary jumbled string matching for highly run-length compressible texts , 2013, Inf. Process. Lett..

[13]  Stephane Durocher,et al.  Indexed Geometric Jumbled Pattern Matching , 2014, CPM.

[14]  Zsuzsanna Lipták,et al.  On Approximate Jumbled Pattern Matching in Strings , 2011, Theory of Computing Systems.

[15]  Zsuzsanna Lipták,et al.  Searching for Jumbled Patterns in Strings , 2009, Stringology.

[16]  Moshe Lewenstein,et al.  Clustered Integer 3SUM via Additive Combinatorics , 2015, STOC.