sequential and indexed two dimensional combinatorial template matching allowing rotations we present new and faster algorithms to search for a two dimensional pattern in a two dimensional text allowing any rotation of the pattern this has applications such as image databases and computational biology we consider the cases of exact and approximate matching under several matching models using a combinatorial approach that generalizes string matching techniques we focus on sequential algorithms where only the pattern can be preprocessed as well as on indexed algorithms where the text is preprocessed and an index built on it on sequential searching we derive average case lower bounds and then obtain optimal average case algorithms for all the matching models at the same time these algorithms are worst case optimal on indexed searching we obtain search time polylogarithmic on the text size as well as sublinear time in general for approximate searching

block edit models for approximate string matching in this paper we examine string block edit distance in which two strings a and b are compared by extracting collections of substrings and placing them into correspondence this model accounts for certain phenomena encountered in important real world applications including pen computing and molecular biology the basic problem admits a family of variations depending on whether the strings must be matched in their entireties and whether overlap is permitted we show that several variants are npcomplete and give polynomial time algorithms for solving the remainder

finding maximal 2 dimensional palindromes abstract this paper extends the problem of palindrome searching into a higher dimension addressing two definitions of 2d palindromes the first definition implies a square while the second definition also known as a centrosymmetric factor can be any rectangular shape we present a linear time algorithm for locating all maximal square 2d palindromes in a given 2d text for the second definition of palindromes rect2dp we present two different algorithms given a text of size n n the first algorithm has time o n 3 which is linear in the worst case output size the second algorithm has time o n 2 log n o c c log n where occ is the number of maximal rect2dp in the output this provides a tradeoff in terms of output size if the output size is small the second algorithm is preferable while the first would be more efficient if the output size is n 3

algorithms for approximate graph matching abstract labeled graphs are graphs in which each node and edge has a label the distance between two labeled graphs is considered to be the weighted sum of the costs of edit operations insert delete and relabel the nodes and edges to transform one graph to the other the paper considers two variants of the approximate graph matching problem agm given a pattern graph p and a data graph d 1 1 what is the distance between p and d 2 2 what is the minimum distance between p and d when subgraphs can be freely removed from d we first show that no efficient algorithm can solve either variant of the agm unless p np then we present several heuristic algorithms leading to approximate solutions the heuristics are based on probabilistic hill climbing and maximum flow techniques our experimental results involving the comparison of real and simulated data demonstrate the good performance of the algorithms presented

a fast bit vector algorithm for approximate string matching based on dynamic programming the approximate string matching problem is to find all locations at which a query of length m matches a substring of a text of length n with k or fewer differences simple and practical bit vector algorithms have been designed for this problem most notably the one used in agrep these algorithms compute a bit representation of the current state set of the k difference automaton for the query and asymptotically run in either o nm w or o nm log s w time where w is the word size of the machine e g 32 or 64 in practice and s is the size of the pattern alphabet here we present an algorithm of comparable simplicity that requires only o nm w time by virtue of computing a bit representation of the relocatable dynamic programming matrix for the problem thus the algorithm s performance is independent of k and it is found to be more efficient than the previous results for many choices of k and small m moreover because the algorithm is not dependent on k it can be used to rapidly compute blocks of the dynamic programming matrix as in the 4 russians algorithm of wu et al 1996 this gives rise to an o kn w expected time algorithm for the case where m may be arbitrarily large in practice this new algorithm that computes a region of the dynamic progr amming d p matrx w entries at a time using the basic algorithm as a subroutine is significantly faster than our previous 4 russians algorithm that computes the same region 4 or 5 entries at a time using table lookup this performance improvement yields a code that is either superior or competitive with all existing algorithms except for some filtration algorithms that are superior when k m is sufficiently small

algorithms for approximate string matching the edit distance between strings a 1 a m and b 1 b n is the minimum cost s of a sequence of editing steps insertions deletions changes that convert one string into the other a well known tabulating method computes s as well as the corresponding editing sequence in time and in space o mn in space o min m n if the editing sequence is not required starting from this method we develop an improved algorithm that works in time and in space o s min m n another improvement with time o s min m n and space o s min s m n is given for the special case where all editing steps have the same cost independently of the characters involved if the editing sequence that gives cost s is not required our algorithms can be implemented in space o min s m n since s o max m n the new methods are always asymptotically as good as the original tabulating method as a by product algorithms are obtained that given a threshold value t test in time o t min m n and in space o min t m n whether s t finally different generalized edit distances are analyzed and conditions are given under which our algorithms can be used in conjunction with extended edit operation sets including for example transposition of adjacent characters

the left and right inverse eigenvalue problems of generalized reflexive and anti reflexive matrices let nxn complex matrices r and s be nontrivial generalized reflection matrices i e r r r 1 i n s s s 1 i n a complex matrix a with order n is said to be a generalized reflexive or anti reflexive matrix if ras a or ras a in this paper the solvability conditions of the left and right inverse eigenvalue problems for generalized reflexive and anti reflexive matrices are derived and the general solutions are also given in addition the associated approximation solutions in the solution sets of the above problems are provided the results in present paper extend some recent conclusions

efficient 2 dimensional approximate matching of half rectangular figures efficient algorithms exist for the approximate two dimensional matching problem for rectangles this is the problem of finding all occurrences of an m m pattern in an n n text with no more than k mismatch insertion and deletion errors in computer vision it is important to generalize this problem to non rectangular figures we make progress towards this goal by defining half rectangular figures of height m and area a the approximate two dimensional matching problem for half rectangular patterns can be solved using a dynamic programming approach in time o an2 we show an o kn2formula formula k2n2 algorithm which combines convolutions with dynamic programming note that our algorithm is superior to previous known solutions for k m13 at the heart of the algorithm are the smaller matching problem and the k aligned ones with location problem these are interesting problems in their own right efficient algorithms to solve both these problems are presented

analysis of two dimensional approximate pattern matching algorithms a k approximate occurrence of a pattern in a text is an occurrence which has hamming distance at most k with the pattern the problem of two dimensional approximate pattern matching is defined as follows given a pattern p of size m2 a text t of size n2 and an integer k find all k approximate occurrences of p in t

two dimensional pattern matching with rotations the problem of pattern matching with rotation is that of finding all occurrences of a two dimensional pattern in a text in all possible rotations we prove an upper and lower bound on the number of such different possible rotated patterns subsequently given an m m array pattern and an n n array text over some finite alphabet we present a new method yielding an o n2m3 time algorithm for this problem

inverse eigenproblems and associated approximation problems for matrices with generalized symmetry or skew symmetry let r cn n be a nontrivial involution i e r r 1 i we say that a cn n is r symmetric r skew symmetric if rar a rar a let s be one of the following subsets of cn n i r symmetric matrices ii hermitian r symmetric matrices iii r skew symmetric matrices iv hermitian r skew symmetric matrices let z cn m with rank z m and diag 1 m the inverse eigenproblem consists of finding z such that the set s z a s az z is nonempty and to find the general form of a s z in all cases we use the special spectral properties of s to essentially characterize the set of admissible pairs z and the special structure of the members of s to obtain the general solution of the inverse eigenproblem given an arbitrary b s the approximation problem consists of finding the unique matrix ab s z that best approximates b in the frobenius norm it is not necessary to assume that r r in connection with the inverse eigenproblem for r symmetric or r skew symmetric matrices however we impose this additional assumption in connection with the inverse eigenproblem for hermitian r symmetric or r skew symmetric matrices and in connection with the approximation problem for i iv

incremental string comparison the problem of comparing two sequences a and b to determine their longest common subsequence lcs or the edit distance between them has been much studied in this paper we consider the following incremental version of these problems given an appropriate encoding of a comparison between a and b can one incrementally compute the answer for a and bb and the answer for a and bb with equal efficiency where b is an additional symbol our main result is a theorem exposing a surprising relationship between the dynamic programming solutions for two such adjacent problems given a threshold k on the number of differences to be permitted in an alignment the theorem leads directly to an o k algorithm for incrementally computing a new solution from an old one as contrasts the o k2 time required to compute a solution from scratch we further show with a series of applications that this algorithm is indeed more powerful than its nonincremental counterpart we show this by solving the applications with greater asymptotic efficiency than heretofore possible for example we obtain o nk algorithms for the longest prefix approximate match problem the approximate overlap problem and cyclic string comparison

matrices with multiple symmetry properties applications of centrohermitian and perhermitian matrices abstract twelve known symmetry patterns of matrices are combined with three modest patterns to form a steiner triple system we investigate matrices satisfying more than one symmetry pattern we show how a group of operators on gl n c gives rise to distinct types of matrices which satisfy sets of patterns and which give unique decompositions of matrices into components of each type these give a new characterization of normal and unitary matrices we extend symmetry patterns to vectors to study spectral properties of these matrices when a skew symmetric basis of eigenvectors exist we can infer symmetry properties of these matrices

left and right inverse eigenpairs problem of generalized centrosymmetric matrices and its optimal approximation problem in this paper the left and right inverse eigenpairs problem for generalized centrosymmetric matrices is considered we obtain the necessary and sufficient conditions for the solvability of the problem and we present the general expression of the solution the related optimal approximation problem to a given matrix over the solution set is solved in addition a numerical algorithm and examples to solve the problem are given

on the construction of classes of suffix trees for square matrices we provide a uniform framework for the study of index data structures for a two dimensional matrixtext1 n 1 n whose entries are drawn from an ordered alphabet an index fortextcan be informally seen as the two dimensional analog of the suffix tree for a string it allows on line searches and statistics to be performed ontextby representing compactly the n3 square submatrices oftextin optimalo n2 space we identify 4n 1families of indices fortext each containing ni 1 2i 1 isomorphic data structures we also develop techniques leading to a single algorithm that efficiently builds any index in any family ino n2logn time ando n2 space such an algorithm improves in various respects the algorithms for the construction of the pat tree and the lsuffix tree the framework and the algorithm easily generalize tod 2 dimensions moreover as part of our algorithm we provide new algorithmic tools that yield a space efficient implementation of the naming scheme of r karpet al in proceedings fourth symposium on theory of computing pp 125 136 for strings and matrices

left and right inverse eigenvalue problem of r s symmetric matrices and its optimal approximation problem the left and right inverse eigenvalue problem which mainly arises in perturbation analysis of matrix eigenvalue and recursive matters has some practical applications in engineer and scientific computation fields in this paper we give the solvability conditions of and the general expressions to the left and right inverse eigenvalue problem for the r s symmetric and r s skew symmetric solutions the corresponding best approximation problems for the left and right inverse eigenvalue problem are also solved that is given an arbitrary complex n by n matrix a find a r s symmetric or r s skew symmetric matrix a a which is the solution to the left and right inverse eigenvalue problem such that the distance between a and a a is minimized in the frobenius norm we give an explicit solution to the best approximation problem in the r s symmetric and r s skew symmetric solution sets of the left and right inverse eigenvalue problem under the assumption that r r and s s a numerical example is given to illustrate the effectiveness of our method

a kind of inverse eigenvalue problems of jacobi matrix this paper considers the problem of constructing two jacobi matrices from their principal submatrix and specially ordered defective eigenpairs the two jacobi matrices are the same except for the entries in the last column and last row the necessary and sufficient condition of solvability is derived furthermore two algorithms and numerical examples are given

the inverse eigenvalue problem for hermitian anti reflexive matrices and its approximation in this paper we first consider the inverse eigenvalue problem as follows find a matrix a with specified eigenpairs where a is a hermitian anti reflexive matrix with respect to a given generalized reflection matrix j the sufficient and necessary conditions are obtained and a general representation of such a matrix is presented we denote the set of such matrices by s a then the best approximation problem for the inverse eigenproblem is discussed that is given an arbitrary a find a matrix email protected s a which is nearest to a in the frobenius norm we show that the best approximation is unique and provide an expression for this nearest matrix

a generalization of the suffix tree to square matrices with applications we describe a new data structure the lsuffix tree which generalizes mccreight s suffix tree for a string j assoc comput mach 23 1976 pp 262 272 to a square matrix all matrices have entries from a totally ordered alphabet sigma based on the lsuffix tree we give efficient algorithms for the static versions of the following dual problems that arise in low level image processing and visual databases two dimensional pattern retrieval we have a library of texts s text 1 cdots text r where text i is an n i times n i matrix 1 leq i leq r we may preprocess the library then given an m times m m leq n i 1 leq i leq r pattern matrix pat we want to find all occurrences of pat in text for all text in s let t s sigma i 1 r n i 2 be the size of the library the preprocessing step builds the lsuffix tree for the matrices in s and then transforms it into an index a trie defined over sigma it takes o t s log sigma log t s time and o t s space the index can be queried directly in o m 2 log sigma totocc time where totocc is the total number of occurrences of pat in text for all text in s two dimensional dictionary matching we have a dictionary of patterns dc pat 1 cdots pat s where pat i is of dimension m i times m i 1 leq i leq s we may preprocess the dictionary then given an n times n text matrix text we want to search for all occurrences of patterns in the dictionary in the text let t dc sigma i 1 s m 2 i be the size of the dictionary and let overline t dc be the sum of the m i s the preprocessing consists of building the lsuffix tree for the matrices in dc it takes o t dc log sigma overline t dc log overline t dc time and o t dc space the search step takes o n 2 log sigma log overline t dc totocc time where totocc is the total number of occurrences of patterns in the text both problems have a dynamic version in which the library and the dictionary respectively can be updated by insertion or deletion of square matrices in them in a companion paper we will provide algorithms for the dynamic version

on updating suffix tree labels abstract we investigate the problem of maintaining the arc labels in the suffix tree data structure gusfield et al 1992 amir et al 1994 when it undergoes string insertions and deletions in current literature this problem is solved either by a simple accounting strategy to obtain amortized bounds fiala and green 1989 larson 1996 or by a periodical suffix tree reconstruction to obtain worst case bounds according to the global rebuilding technique in overmars 1983 unfortunately the former approach is simple and space efficient at the cost of attaining amortized bounds for the single update the latter is space consuming in practice because it needs to keep two extra suffix tree copies in this paper we obtain a simple realtime algorithm that achieves worst case bounds and only requires small additional space i e a bi directional pointer per suffix tree label we analyze it by introducing a combinatorial coloring problem on the suffix tree arcs

the solvability conditions for the inverse eigenvalue problems of centro symmetric matrices this paper involves related inverse eigenvalue problems of centro symmetric matrices and their optimal approximation the sufficient and necessary conditions under which the solvable problems of inverse eigenvalue and the general provided form of the solution furthermore the algorithm to compute the optimal approximate solution and some numerical experiments are given

logarithmic depth circuits for algebraic functions this paper describes circuits for computation of a large class of algebraic functions on polynomials power series and integers for which it has been a long standing open problem to compute in depth less than omega log n 2 algebraic circuits assume unit cost for elemental addition and multiplication this paper describes o log n depth algebraic circuits which given as input the coefficients of n degree polynomials over an appropriate ring compute the product of n o 1 polynomials the symmetric functions as well as division and interpolation of real polynomials also described are o log n depth algebraic circuits which are given as input the first n coefficients of a power series over an appropriate ring compute the product of n o 1 power series as well as division reciprocal and reversion of real power series furthermore this paper describes boolean circuits of depth o log n log log n which given n bit binary numbers compute the product of n numbers and integ

suffix arrays a new method for on line string searches a new and conceptually simple data structure called a suffix array for on line string searches is introduced in this paper constructing and querying suffix arrays is reduced to a sort and search paradigm that employs novel algorithms the main advantage of suffix arrays over suffix trees is that in practice they use three to five times less space from a complexity standpoint suffix arrays permit on line string searches of the type is w a substring of a to be answered in time o p log n where p is the length of w and n is the length of a which is competitive with and in some cases slightly better than suffix trees the only drawback is that in those instances where the underlying alphabet is finite and small suffix trees can be constructed in o n time in the worst case versus o n log n time for suffix arrays however an augmented algorithm is given that regardless of the alphabet size constructs suffix arrays in o n expected time albeit with lesser space efficiency it is

efficient two dimensional pattern matching in the presence of errors abstract we give an algorithm for two dimensional pattern matching in the presence of errors we find that the complexity of our algorithm is o kn 1 n 2 log n 2 n 1 2 n 2 kn 1 m 1 m 2 where the pattern is an n 1 n 2 array the text is an m 1 m 2 array and k is the number of mismatches allowed

quaternionic factorization of the schrodinger operator and its applications to some first order systems of mathematical physics we show that an ample class of physically meaningful partial differential systems of first order such as the dirac equation with different one component potentials static maxwell s system and the system describing the force free magnetic fields are equivalent to a single quaternionic equation which in its turn reduces in general to a schrodinger equation with quaternionic potential and in some situations this last can be diagonalized the rich variety of methods developed for different problems corresponding to the schrodinger equation can be applied to the systems considered in the present work

faster two dimensional pattern matching with rotations the most efficient currently known algorithms for two dimensional pattern matching with rotations have a worst case time complexity of o n 2m 3 where the size of the text is nxn and the size of the pattern is mxm in this paper we present a new algorithm for the problem whose running time is o n 2m 2

an improved algorithm for approximate string matching given a text string a pattern string and an integer k a new algorithm for finding all occurrences of the pattern string in the text string with at most k differences is presented both its theoretical and practical variants improve upon the known algorithms

extending alignments with k mismatches and l gaps recently the problem of extending an alignment with k mismatches and a single gap for pairwise sequence alignment was introduced flouri et al 2011 the authors considered the problem of extending an alignment under the hamming distance model by also allowing the insertion of a single gap and presented a q email protected time algorithm to solve it where m is the length of the shortest sequence to be extended and b is the maximum allowed length of the single gap very recently it was shown flouri et al 2012 that this problem is strongly and directly motivated by the next generation re sequencing application aligning tens of millions of short dna sequences against a reference genome in this article we consider an extension of this problem extending an alignment with k mismatches and two gaps and present a q email protected time algorithm to solve it this extension is proved to be fundamental in the next generation re sequencing application alachiotis et al 2012 in addition we present a generalisation of our solution to solve the problem of extending an alignment with k mismatches and gaps in time q email protected the presented solutions work provided that all gaps in the alignment must occur in one of the two sequences

exact solutions of the dirac equation with harmonic pseudoscalar scalar or electric potential a new class of exact solutions is obtained in explicit form for the dirac equation with a pseudoscalar or scalar or electric static potential the potential may be an arbitrary harmonic function the gradient squared of which is a constant it is shown that the set of such potentials is sufficiently ample the simplest example is the linear function another example is the function where is an arbitrary analytic function depending on the complex variable the solutions are obtained using the technique of biquaternionic projection operators which itself is interesting since its possible applications are not limited to the situation considered in this paper

a note on the height of suffix trees consider a random word in which the individual symbols are drawn from a finite or infinite alphabet with symbol probabilities p i and let h n be the height of the suffix tree constructed from the first n suffixes of this word it is shown that h n is asymptotically close to 2 log n log 1 sum i p i 2 in many respects the difference is o log log n in probability and the ratio tends to one almost surely and in the mean

fast algorithms for finding nearest common ancestors we consider the following problem given a collection of rooted trees answer on line queries of the form what is the nearest common ancester of vertices x and y we show that any pointer machine that solves this problem requires omega log log n time per query in the worst case where n is the total number of vertices in the trees on the other hand we present an algorithm for a random access machine with uniform cost measure and a bound of omega log n on the number of bits per word that requires o 1 time per query and o n preprocessing time assuming that the collection of trees is static for a version of the problem in which the trees can change between queries we obtain an almost linear time and linear space algorithm

on beltrami fields with nonconstant proportionality factor the equation rot x x x 0 is considered where is a nonvanishing complex valued function its quaternionic reformulation is obtained which is used for constructing integral representations for solutions in the case when is a function of one variable we show that in this case the solution of the considered equation reduces to the solution of three different schrodinger equations with potentials depending on one variable

generalizations of suffix arrays to multi dimensional matrices we propose multi dimensional index data structures that generalize suffix arrays to square matrices and cubic matrices giancarlo proposed a two dimensional index data structure the lsuffix tree that generalizes suffix trees to square matrices however the construction algorithm for lsuffix trees maintains complicated data structures and uses a large amount of space we present simple construction algorithms for multi dimensional suffix arrays by applying a new partitioning technique to lexicographic sorting our contributions are the first efficient algorithms for constructing two dimensional and three dimensional suffix arrays directly

multiple matching of rectangular patterns we describe the first worst case efficient algorithm for simultaneously matching multiple rectangular patterns of varying sizes and aspect ratios in a rectangular text efficient means significantly more efficient asymptotically than applying known algorithms that handle one height or width or aspect ratio at a time for each height our algorithm features an interesting use of multidimensional range searching as well as new adaptations of several known techniques for two dimensional string matching we also extend our algorithm to a dynamic setting where the set of patterns can change over time

finding patterns and periods in cartesian tree matching abstract we introduce a new metric of match called cartesian tree matching which means that two strings match if they have the same cartesian trees based on cartesian tree matching we define single pattern matching multiple pattern matching and indexing problems we propose a linear time algorithm for single pattern matching and randomized linear time algorithms for multiple pattern matching and indexing we also define three types of periods called full period initial period and general period we propose o n time o n log log n time and o n log n time algorithms for finding all the full periods initial periods and general periods of a string of length n respectively our efficient algorithms use a representation of the cartesian tree called parent distance representation

two inverse eigenvalue problems for a special kind of matrices in this paper a special kind of matrices which are symmetric all elements are equal to zero except for the first row the first column and the diagonal elements and the elements of the first row are positive except for the first one are considered two inverse problems are discussed one is to construct one of this kind of matrices by the minimal and maximal eigenvalues of its all leading principal submatrices the other is to construct one of this kind of matrix by one of its eigenpair and eigenvalues of its all leading principal submatrices the necessary and sufficient conditions for the solvability of the two problems are derived furthermore corresponding numerical algorithms and some examples are given

usefulness of the karp miller rosenberg algorithm in parallel computations on strings and arrays abstract the karp miller rosenberg 1972 algorithm was one of the first efficient almost linear sequential algorithms for finding repeated patterns and for string matching in the area of efficient sequential computations on strings it was soon superseded by more efficient and more sophisticated algorithms we show that the karp miller rosenberg algorithm kmr must be considered as a basic technique in parallel computations for many problems variations of kmr give the known most efficient parallel algorithms the representation of the set of basic factors subarrays of a string array produced by the algorithm is an extremely useful data structure in parallel algorithms on strings and arrays this gives also a general unifying framework for a large variety of problems we show that the following problems for strings and arrays can be solved by almost optimal parallel algorithms pattern matching longest repeated factor subarray longest common factor subarray maximal symmetric factor subarray also the following problems for strings can be solved within the same complexity bounds finding squares testing even palstars and compositions of k palindromes for k 2 3 4 computing lyndon factorization and building minimal pattern matching automata in the model without concurrent writes the parallel time is o log n 2 with n processors and in the model with concurrent writes the time for most of the problems is o log n with n processors for two problems related to the one dimensional case longest repeated factor and longest common factor there were designed parallel algorithms using suffix trees apostolico et al 1988 however our data structure is simpler and furthermore for the two dimensional case suffix trees do not work the complexity of our algorithms does not depend on the size of the alphabet except for the computation of pattern matching automata

left and right inverse eigenpairs problem of skew centrosymmetric matrices the left and right inverse eigenvalue problem of skew centrosymmetric matrices and its optimal approximation are considered new necessary and sufficient conditions for the solvability of the problem are derived the general expression of the solution is given the optimal approximate solution and some numerical experiments are also provided

fast parallel and serial multidimensional approximate array matching abstract consider the multidimensional array matching problem where differences between characters of the pattern and characters of the text are permitted a difference may be due to a mismatch between a text and pattern character superfluous text character or superfluous pattern character given a d dimensional array of size nd text and a d dimensional array of size md pattern we present the following algorithms for a given k find all occurrences of the pattern in the text with at most k differences our serial algorithm runs in time o nd dk k2 and the parallel algorithm runs in time o d dlog n k k2 using nd processors if superfluous characters are not allowed and the only permitted errors are mismatches we solve the problem serially in time o nddk and in parallel in time o d dlogn k using nd processors we present an alternate algorithm for the mismatches problem which runs serially in time o 2dndlog2 m and in parallel in time o d log n using nd processors this algorithm is more efficient for large k we also give an efficient solution to the close match problem here a mismatch weight function f 0 1 is assigned the weight function gives weight to the mismatches some mismatches being worse than others we present a serial algorithm for finding all appearances of the pattern in the text with a bounded total error in time o 2dnd log2 m our parallel algorithm is again of time complexity o d log n using nd processors

average complexity of exact and approximate multiple string matching we show that the average number of characters examined to search for r random patterns of length m in a text of length n over a uniformly distributed alphabet of size cannot be less than n log rm m when we permit up to k insertions deletions and or substitutions of characters in the occurrences of the patterns the lower bound becomes n k log rm m this generalizes previous single pattern lower bounds of yao for exact matching and of chang and marr for approximate matching and proves the optimality of several existing multipattern search algorithms