English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

If you have G = (V, T, S, P) where V= { a, b, A, B, S}, T = {a, b}

S is the start symbol, and P = {S --> ABa, A --> BB, B --> ab, AB -->, AB -->b}.

Can someone please explain how to get to the production portion of this problem as simply as possible. I just don't understand how to take information from one set and the other and make the sets to get to the production answer of this problem.

2007-10-23 16:38:40 · 1 answers · asked by Mary C 1 in Science & Mathematics Mathematics

What I don’t understand is to start with S from G= (V, T, S, P) and take what is in the V=set { a, b, A, B, S} and T = {a, b} to get S--> ABa, A-->BB etc. Each one, hope this makes sense.

2007-10-26 10:31:12 · update #1

1 answers

I don't understand the question.

A phrase structure grammar consists of a set of rewrite rules P. The language defined by the grammar is the set of all strings consisting entirely of terminal symbols (from the set T), that can be derived from (by means of rewriting) from the starting symbol, S.

For example:

S
ABa (using S--> ABa)
a (using AB -->)

S
ABa
BBBa (using A --> BB)
abababa (using B --> ab three times)

etc.

so "a", "ba", "ababaaba", are in the language, but "b" is not.

In this case, the language is finite and rather small. In the general case, it can be infinite.

If this doesn't help, please ask you question in a different way so we can figure out what it is you don't understand.

2007-10-25 19:18:06 · answer #1 · answered by simplicitus 7 · 0 0

fedest.com, questions and answers