Re: Regular Tree Grammar vs. Context-Free Grammar
- From: Eric Wohlstadter <wohlstad@xxxxxxxxx>
- Date: Fri, 08 Dec 2006 14:34:04 -0800
Thanks for the replies.
Just to be clear then: There is a hierarchy of inclusion:
Regular Word Grammar < Regular Tree Grammar < Context-Free Grammar
because every regular tree grammar can be simulated by a CFG using "matching parenthesis". Furthermore, regular tree grammars are a proper subset of CFGs. That is, there are some CFGs which cannot be represented using a regular tree grammar.
Is this correct?
Eric
Hans Aberg wrote:
In article <87mz5zdru4.fsf@xxxxxxxxx>, Ben Bacarisse.
<ben.usenet@xxxxxxxxx> wrote:
I am wondering if anyone can help me with information aboutThe right hand sides of the productions of an RTG are trees and those
the relationship between regular tree grammars and CFGs? In particular
do the languages accepted by CFGs include (subsume) the languages
accepted by regular tree grammars?
of a CFG are sequences, but the way the productions of an RTG are
written gives you a CFG if you just turn the meta-notation into
notation! Construct a CFG whose terminal alphabet is augmented with
three symbols: "{", ";" and "}" and turn each RTG production of the
form:
A -> f(X,Y)
into:
A -> f { X ; Y }
and so on. I've changed the brackets and separator to make the
transformation clearer, but there is no need to.
Perhaps you might add this to:
http://en.wikipedia.org/wiki/Regular_tree_grammar
And you might just as well augment the terminal set by a disjoint union of
the set {'(', ',', ')'}, a way to say that if these already exist, add a
formally distinct copy. Use indices to make a distinction at need. Then
A -> f(X,Y)
is replaced by
A -> f '(' X ',' Y ')'
which by "abuse of notation" may be written
A -> f(X,Y)
:-)
- Follow-Ups:
- Re: Regular Tree Grammar vs. Context-Free Grammar
- From: Ben Bacarisse
- Re: Regular Tree Grammar vs. Context-Free Grammar
- References:
- Regular Tree Grammar vs. Context-Free Grammar
- From: Eric Wohlstadter
- Re: Regular Tree Grammar vs. Context-Free Grammar
- From: Ben Bacarisse
- Re: Regular Tree Grammar vs. Context-Free Grammar
- From: Hans Aberg
- Regular Tree Grammar vs. Context-Free Grammar
- Prev by Date: Re: Regular Tree Grammar vs. Context-Free Grammar
- Next by Date: using non determinstic TM to prove NP is closed under kleene closure
- Previous by thread: Re: Regular Tree Grammar vs. Context-Free Grammar
- Next by thread: Re: Regular Tree Grammar vs. Context-Free Grammar
- Index(es):