An Algorithm for Comparing Deterministic Regular Tree Grammars
نویسنده
چکیده
An algorithm to decide inclusion for languages de ned by deterministic regular tree grammars is presented. The algorithm is shown to run in polynomial time based on the number of constructors, constructor arity, and number of non-terminals. Correctness proofs are included. 1 Regular tree grammars A regular tree grammar, G, is a grammar for constructing trees. Formally, G = (C;N;P; S) where: 1. C is a nite, non-empty set of constructors. Each constructor c is of arity n. Constants are 0-arity constructors. 2. N is a nite, non-empty set of non-terminals where N \ C = ;. 3. P is a nite set of productions of the form A ! c(X1; : : : ;Xn) where A is a non-terminal, c is a constructor, and each Xi is a non-terminal. If the constructor is a constant, then we write c as a shorthand for c(). 4. S is a special element of N called the start symbol. A regular tree is constructed from a regular tree grammar in the following manner: 1. If A is a non-terminal, then the tree whose only node is A is a regular tree. 2. If t is a regular tree, B is an occurrence of a non-terminal in t, and there is a production B ! c(X1; : : : ;Xn), then the result of replacing in t the occurrence of B with a tree whose root is c and whose children in left to right order are X1; : : : ;Xn is a regular tree. If the regular tree t is constructed starting from a non-terminal A then we say that A derives t. A tree is a proper tree if it contains only constructors and is an improper tree if it contains a non-terminal. For a grammar G = (C;N; P; S), the language generated by G, L(G), is the set of all proper trees derivable from S. A regular tree grammar is deterministic if for each non-terminal A and constructor c, there is at most one production of the form A ! c(X1; : : : ;Xn). In this paper we will consider only deterministic regular tree grammars and their languages. Deterministic regular tree grammars provide a convenient way of describing recursive data. [Liu98] presents a method of analyzing recursive data that uses these grammars as results of a xed point computation. A xed point is found when consecutive grammars G1 and G2 are iterated such that L(G2) contains L(G1).
منابع مشابه
PreRkTAG: Prediction of RNA Knotted Structures Using Tree Adjoining Grammars
Background: RNA molecules play many important regulatory, catalytic and structural <span style="font-variant: normal; font-style: norma...
متن کاملAlternating Regular Tree Grammars in the Framework of Lattice-Valued Logic
In this paper, two different ways of introducing alternation for lattice-valued (referred to as {L}valued) regular tree grammars and {L}valued top-down tree automata are compared. One is the way which defines the alternating regular tree grammar, i.e., alternation is governed by the non-terminals of the grammar and the other is the way which combines state with alternation. The first way is ta...
متن کاملProbabilistic regular graphs
Deterministic graph grammars generate regular graphs, that form a structural extension of configuration graphs of pushdown systems. In this paper, we study a probabilistic extension of regular graphs obtained by labelling the terminal arcs of the graph grammars by probabilities. Stochastic properties of these graphs are expressed using PCTL, a probabilistic extension of computation tree logic. ...
متن کاملCount-based State Merging for Probabilistic Regular Tree Grammars
We present an approach to obtain language models from a tree corpus using probabilistic regular tree grammars (prtg). Starting with a prtg only generating trees from the corpus, the prtg is generalized step by step by merging nonterminals. We focus on bottom-up deterministic prtg to simplify the calculations.
متن کاملExpressing Context-Free Tree Languages by Regular Tree Grammars
In this thesis, three methods are investigated to express context-free tree languages by regular tree grammars. The first method is a characterization. We show restrictions to context-free tree grammars such that, for each restricted context-free tree grammar, a regular tree grammar can be constructed that induces the same tree language. The other two methods are approximations. An arbitrary co...
متن کامل