Space Lower Bounds for Online Pattern Matching

We present space lower bounds for online pattern matching under a number of different distance measures. Given a pattern of length m and a text that arrives one character at a time, the online pattern matching problem is to report the distance between the pattern and a sliding window of the text as soon as the new character arrives. We require that the correct answer is given at each position with constant probability. We give Ω(m) bit space lower bounds for L1, L2, L∞, Hamming, edit and swap distances as well as for any algorithm that computes the cross-correlation/convolution. We then show a dichotomy between distance functions that have wildcard-like properties and those that do not. In the former case which includes, as an example, pattern matching with character classes, we give Ω(m) bit space lower bounds. For other distance functions, we show that there exist space bounds of Ω(log m) and O(log2 m) bits. Finally we discuss space lower bounds for non-binary inputs and show how in some cases they can be improved.

[1]  Andrew Chi-Chih Yao,et al.  Some complexity questions related to distributive computing(Preliminary Report) , 1979, STOC.

[2]  Shengyu Zhang,et al.  The communication complexity of the Hamming distance problem , 2006, Inf. Process. Lett..

[3]  Robert Krauthgamer,et al.  Approximating edit distance efficiently , 2004, 45th Annual IEEE Symposium on Foundations of Computer Science.

[4]  Oded Goldreich,et al.  Unbiased Bits from Sources of Weak Randomness and Probabilistic Communication Complexity , 1988, SIAM J. Comput..

[5]  S. Muthukrishnan,et al.  String Matching Under a General Matching Relation , 1995, Inf. Comput..

[6]  Gad M. Landau,et al.  Pattern Matching with Swaps , 2000, J. Algorithms.

[7]  Ron Shamir,et al.  Faster pattern matching with character classes using prime number encoding , 2009, J. Comput. Syst. Sci..

[8]  Ely Porat,et al.  Exact and Approximate Pattern Matching in the Streaming Model , 2009, 2009 50th Annual IEEE Symposium on Foundations of Computer Science.

[9]  Piotr Indyk,et al.  Maintaining Stream Statistics over Sliding Windows , 2002, SIAM J. Comput..

[10]  Eyal Kushilevitz,et al.  Communication Complexity , 1997, Adv. Comput..

[11]  Ilan Newman,et al.  Private vs. Common Random Bits in Communication Complexity , 1991, Inf. Process. Lett..

[12]  Ravi Kumar,et al.  The One-Way Communication Complexity of Hamming Distance , 2008, Theory Comput..