pattern matching
30 papers tagged with this keyword
Modulated String Searching
Published
• View Publication
• BIB
In his 1987 paper entitled "Generalized String Matching", Abrahamson introduced {\em pattern matching with character classes} and provided the first efficient algorithm to solve it. The best known solution to date is due to Linhart and Shamir (2009).
Another broad yet comparatively less studied class of string matching problems is that of numerical string searching, such as, e.g., the `less-than' or $L_1$-norm string searching. The best known solutions for problems in this class are based on FFT convolution after some suitable re-encoding.
The present paper introduces {\em modulated string searching} as a unified framework for string matching problems where the numerical conditions can be combined with some Boolean/numerical decision conditions on the character classes. One example problem in this class is the {\em locally bounded $L_1$-norm} matching problem on character classes: here the "match" between a character at some position in the text and a set of characters at some position in the pattern is assessed based on the smallest $L_1$ distance between the text character and one of those pattern characters. The two positions "match" if the (absolute value of the) difference between the two characters does not exceed a predefined constant. The pattern has an occurrence in an alignment with the text if the sum of all such differences does not exceed a second predefined constant value. This problem requires a pointwise evaluation of the quality of each match and has no known solution based on the previously mentioned algorithms.
The computational landscape of permutation patterns
Published in Pure Mathematics and Applications, 24 (2): 83-101, 2013
• Search Publication
In the last years, different types of patterns in permutations have been studied: vincular, bivincular and mesh patterns, just to name a few. Every type of permutation pattern naturally defines a corresponding computational problem: Given a pattern P and a permutation T (the text), is P contained in T? In this paper we draw a map of the computational landscape of permutation pattern matching with different types of patterns. We provide a classical complexity analysis and investigate the impact of the pattern length on the computational hardness. Furthermore, we highlight several directions in which the study of computational aspects of permutation patterns could evolve.
A Fast Algorithm for Permutation Pattern Matching Based on Alternating Runs
Published
• View Publication
• BIB
The NP-complete Permutation Pattern Matching problem asks whether a $k$-permutation $P$ is contained in a $n$-permutation $T$ as a pattern. This is the case if there exists an order-preserving embedding of $P$ into $T$. In this paper, we present a fixed-parameter algorithm solving this problem with a worst-case runtime of $\mathcal{O}(1.79^{\mathsf{run}(T)}\cdot n\cdot k)$, where $\mathsf{run}(T)$ denotes the number of alternating runs of $T$. This algorithm is particularly well-suited for instances where $T$ has few runs, i.e., few ups and downs. Moreover, since $\mathsf{run}(T)<n$, this can be seen as a $\mathcal{O}(1.79^{n}\cdot n\cdot k)$ algorithm which is the first to beat the exponential $2^n$ runtime of brute-force search. Furthermore, we prove that under standard complexity theoretic assumptions such a fixed-parameter tractability result is not possible for $\mathsf{run}(P)$.
A W[1]-Completeness Result for Generalized Permutation Pattern Matching
The NP-complete Permutation Pattern Matching problem asks whether a permutation P (the pattern) can be matched into a permutation T (the text). A matching is an order-preserving embedding of P into T. In the Generalized Permutation Pattern Matching problem one can additionally enforce that certain adjacent elements in the pattern must be mapped to adjacent elements in the text. This paper studies the parameterized complexity of this more general problem. We show W[1]-completeness with respect to the length of the pattern P. Under standard complexity theoretic assumptions this implies that no fixed-parameter tractable algorithm can be found for any parameter depending solely on P.
Patterns in column strict fillings of rectangular arrays
In this paper, we study pattern matching in the set F_{n,k} of fillings of the k x n rectangle with the integers 1,...,kn such that the elements in any column increase from bottom to top. Let P be a column strict tableau of shape 2^k. We say that a filling F in F_{n,k} has P-match starting at i if the elements of F in columns i and i+1 have the same relative order as the elements of P. We compute the generating functions for the distribution of P-matches and nonoverlapping P-matches for various classes of standard tableaux of shape 2^k. We say that a filling F in F_{n,k} is P-alternating if there are P-matches of F starting at all odd positions but there are no P-matches of F starting at even positions. We also compute the generating functions for P-alternating elements of F_{n,k} for various classes of standard tableaux of shape 2^k.
Pattern Matching in the Cycle Structure of Permutations
In this paper, we study the occurrence of patterns in the cycle structures of permutations.
On a pattern avoidance condition for the wreath product of cyclic groups with symmetric groups
Published
• View Publication
• BIB
In this paper, we extend to a non-consecutive case, the study of the pattern matching condition on the wreath product of the cyclic group and the symmetric group initiated by the authors in a previous paper. The main focus of our paper is (colored) patterns of length 2, although a number of enumerative results for longer patterns are also presented. A new non-trivial bijective interpretation for the Catalan numbers is found, in terms of simultaneously bi-avoiding two patterns in a wreath product.
New pattern matching conditions for wreath products of the cyclic groups with symmetric groups
We present several multi-variable generating functions for a new pattern matching condition on the wreath product of the cyclic group and the symmetric group. Our new pattern matching condition requires that the underlying permutations match in the usual sense of pattern matching for the symmetric group and that the corresponding sequence of signs match in the sense of words, rather than the exact equality of signs which has been previously studied. We produce the generating functions for the number of matches that occur in elements of the wreath product for any pattern of length 2 by applying appropriate homomorphisms from the ring of symmetric functions over an infinite number of variables to simple symmetric function identities. We also provide multi-variable generating functions for the distribution of non-overlapping matches and for the number of elements of the wreath product which have exactly 2 matches which do not overlap for several patterns of length 2.
Counting Complex Disordered States by Efficient Pattern Matching: Chromatic Polynomials and Potts Partition Functions
Published in New J. Phys. 11:023001 (2009); freely available online
• View Publication
• BIB
Counting problems, determining the number of possible states of a large system under certain constraints, play an important role in many areas of science. They naturally arise for complex disordered systems in physics and chemistry, in mathematical graph theory, and in computer science. Counting problems, however, are among the hardest problems to access computationally. Here, we suggest a novel method to access a benchmark counting problem, finding chromatic polynomials of graphs. We develop a vertex-oriented symbolic pattern matching algorithm that exploits the equivalence between the chromatic polynomial and the zero-temperature partition function of the Potts antiferromagnet on the same graph. Implementing this bottom-up algorithm using appropriate computer algebra, the new method outperforms standard top-down methods by several orders of magnitude, already for moderately sized graphs. As a first application, we compute chromatic polynomials of samples of the simple cubic lattice, for the first time computationally accessing three-dimensional lattices of physical relevance. The method offers straightforward generalizations to several other counting problems.
Multiple pattern matching: A Markov chain approach
Published
• View Publication
• BIB
RNA motifs typically consist of short, modular patterns that include base pairs formed within and between modules. Estimating the abundance of these patterns is of fundamental importance for assessing the statistical significance of matches in genomewide searches, and for predicting whether a given function has evolved many times in different species or arose from a single common ancestor. In this manuscript, we review in an integrated and self-contained manner some basic concepts of automata theory, generating functions and transfer matrix methods that are relevant to pattern analysis in biological sequences. We formalize, in a general framework, the concept of Markov chain embedding to analyze patterns in random strings produced by a memoryless source. This conceptualization, together with the capability of automata to recognize complicated patterns, allows a systematic analysis of problems related to the occurrence and frequency of patterns in random strings. The applications we present focus on the concept of synchronization of automata, as well as automata used to search for a finite number of keywords (including sets of patterns generated according to base pairing rules) in a general text.