L_p Pattern Matching in a Stream

07/09/2019
by   Tatiana Starikovskaya, et al.
0

We consider the problem of computing distance between a pattern of length n and all n-length subwords of a text in the streaming model. In the streaming setting, only the Hamming distance (L_0) has been studied. It is known that computing the Hamming distance between a pattern and a streaming text exactly requires Ω(n) space. Therefore, to develop sublinear-space solutions, one must relax their requirements. One possibility to do so is to compute only the distances bounded by a threshold k, see [SODA'19, Clifford, Kociumaka, Porat]. The motivation for this variant of this problem is that we are interested in subwords of the text that are similar to the pattern, i.e. in subwords such that the distance between them and the pattern is relatively small. On the other hand, the main application of the streaming setting is processing large-scale data, such as biological data. Recent advances in hardware technology allow generating such data at a very high speed, but unfortunately, the produced data may contain about 10% of noise [Biol. Direct.'07, Klebanov and Yakovlev]. To analyse such data, it is not sufficient to consider small distances only. A possible workaround for this issue is (1±ε)-approximation. This line of research was initiated in [ICALP'16, Clifford and Starikovskaya] who gave a (1±ε)-approximation algorithm with space O(ε^-5√(n)). In this work, we show a suite of new streaming algorithms for computing the Hamming, L_1, L_2 and general L_p (0 < p < 2) distances between the pattern and the text. Our results significantly extend over the previous result in this setting. In particular, for the Hamming distance case and for the L_p distance when 0 < p < 1 we show a streaming algorithm that uses O(ε^-2√(n)) space for polynomial-size alphabets.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/01/2020

Approximating Text-to-Pattern Hamming Distances

We revisit a fundamental problem in string matching: given a pattern of ...
research
09/07/2018

Streaming dictionary matching with mismatches

In the k-mismatch problem we are given a pattern of length m and a text ...
research
06/10/2021

Small space and streaming pattern matching with k edits

In this work, we revisit the fundamental and well-studied problem of app...
research
11/10/2017

Hamming distance completeness and sparse matrix multiplication

We investigate relations between (+,) vector products for binary integer...
research
10/03/2018

Approximating Approximate Pattern Matching

Given a text T of length n and a pattern P of length m, the approximate ...
research
05/13/2021

The Dynamic k-Mismatch Problem

The text-to-pattern Hamming distances problem asks to compute the Hammin...
research
06/11/2021

Matching Patterns with Variables under Hamming Distance

A pattern α is a string of variables and terminal letters. We say that α...

Please sign up or login with your details

Forgot password? Click here to reset