Matching Patterns with Variables under Hamming Distance

06/11/2021
by   Paweł Gawrychowski, et al.
0

A pattern α is a string of variables and terminal letters. We say that α matches a word w, consisting only of terminal letters, if w can be obtained by replacing the variables of α by terminal words. The matching problem, i.e., deciding whether a given pattern matches a given word, was heavily investigated: it is NP-complete in general, but can be solved efficiently for classes of patterns with restricted structure. In this paper, we approach this problem in a generalized setting, by considering approximate pattern matching under Hamming distance. More precisely, we are interested in what is the minimum Hamming distance between w and any word u obtained by replacing the variables of α by terminal words. Firstly, we address the class of regular patterns (in which no variable occurs twice) and propose efficient algorithms for this problem, as well as matching conditional lower bounds. We show that the problem can still be solved efficiently if we allow repeated variables, but restrict the way the different variables can be interleaved according to a locality parameter. However, as soon as we allow a variable to occur more than once and its occurrences can be interleaved arbitrarily with those of other variables, even if none of them occurs more than once, the problem becomes intractable.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/15/2022

Matching Patterns with Variables Under Edit Distance

A pattern α is a string of variables and terminal letters. We say that α...
research
06/17/2019

Matching Patterns with Variables

A pattern p (i.e., a string of variables and terminals) matches a word w...
research
06/19/2021

Checking whether a word is Hamming-isometric in linear time

A finite word f is Hamming-isometric if for any two word u and v of same...
research
11/27/2020

Adaptive Non-linear Pattern Matching Automata

Efficient pattern matching is fundamental for practical term rewrite eng...
research
07/09/2019

L_p Pattern Matching in a Stream

We consider the problem of computing distance between a pattern of lengt...
research
09/07/2022

Nonoverlapping (delta, gamma)-approximate pattern matching

Pattern matching can be used to calculate the support of patterns, and i...
research
04/16/2019

Equivalence classes of small tilings of the Hamming cube

The study of tilings is a major problem in many mathematical instances, ...

Please sign up or login with your details

Forgot password? Click here to reset