Tuesday, 12 May 2015

Q28,paper 3, J 12.Which one of the following is not a Greibach Normal form grammar ?


(i) S →a | bA | aA | bB
A →a
B →b
(ii) S →a | aA | AB
A →a
B →b
(iii) S →a | A | aA
A →a
Options (A) (i) and (ii)
(B) (i) and (iii)
(C) (ii) and (iii)
(D) (i), (ii) and (iii)
Answer(C) (ii) and (iii)
In formal language theory, a context-free grammar is in Greibach normal form (GNF) if the right-hand sides of all production rules start with a terminal symbol, optionally followed by some variables. A non-strict form allows one exception to this format restriction for allowing the empty word (epsilon, ε) to be a member of the described language. The normal form was established by Sheila Greibach and it bears her name.in option B, S->AB fails greibch form. in option C, S->A fails greibach form.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.