This paper presents a Boyer-Moore type algorithm for regular grammar pattern matching, answering a variant of an open problem posed by Aho (Pattern Matching in Strings, Academic Press, New York, 1980, p. 342). The new algorithm handles patterns speciΓΏed by regular (left linear) grammars-a generaliza
A new algorithm for linear regular tree pattern matching
β Scribed by Priti Shankar; Amitranjan Gantait; A.R. Yuvaraj; Maya Madhavan
- Publisher
- Elsevier Science
- Year
- 2000
- Tongue
- English
- Weight
- 129 KB
- Volume
- 242
- Category
- Article
- ISSN
- 0304-3975
No coin nor oath required. For personal study only.
β¦ Synopsis
We consider the problem of linear regular tree pattern matching and describe a new solution based on a bottom up technique. Current bottom up techniques preprocess the patterns and construct a ΓΏnite state tree pattern matching automaton for the purpose. Though matching time is linear in the size of the subject tree, the size of the automaton can be exponential in the sum of the sizes of all patterns. We show here that the problem can be cast as a parsing problem for a context free language, and a solution that uses an extension of the LR parsing technique can be devised. Though the size of the resulting pushdown automaton can be exponential in the pattern size in the worst case, there are problem instances for which exponential gains in succinctness of representation are obtained. The technique has been successfully applied to the problem of generation of an instruction selector in a compiler back end.
π SIMILAR VOLUMES
The main result of this paper is an algorithm for approximate matching of a regular expression of size \(m\) in a text of size \(n\) in time \(O\left(n m / \log _{d+2} n\right)\), where \(d\) is the number of allowed errors. This algorithm is the first \(o(m n)\) algorithm for approximate matching t
We consider the perfect matching problem for a β-regular bipartite graph with n vertices and m edges, i.e., 1 2 nβ = m, and present a new O(m + n log n log β) algorithm. Cole and Rizzi, respectively, gave algorithms of the same complexity as ours, Schrijver also devised an O(mβ) algorithm, and the b