recategorized by
4,696 views
1 votes
1 votes

Which one of the following is not a Greibach Normal form grammar?

(i)

$S \rightarrow a \mid bA \mid aA \mid bB$

$A \rightarrow a$

$B \rightarrow b$

(ii)

$S \rightarrow a \mid aA \mid AB$

$A \rightarrow a$

$B \rightarrow b$

(iii)

$S \rightarrow a \mid A \mid aA $

$A \rightarrow a$

  1. (i) and (ii)
  2. (i) and (iii)
  3. (ii) and (iii)
  4. (i), (ii) and (iii)
recategorized by

2 Answers

Best answer
1 votes
1 votes

A context free Grammar is said to be Greibach normal form if all the productions have the form

A $\rightarrow$ ax

where a∈ T and x∈ v*

(ii)Eliminate due to production $S\rightarrow AB$

(iii)Eliminate Due to production$S\rightarrow A$

only(1) Satisfying the required conditions. 

Hence,Option(C)ii and (iii) is the correct choice.

selected by
1 votes
1 votes

Greibach Normal Form Grammar  :- A CFG  G=(V,T,S,P) is called GNF  if all production have the form 

A->ax where  a belongs to T(terminals) and X belongs to V* here restriction is on the position of terminal and symbol(i.e terminals must present and present before symbol if any) and not on the length.

Now in above options  choice 2 and 3  productions S->AB and S->A which violates above condition hence ans is C

Answer:

Related questions

2 votes
2 votes
2 answers
1
go_editor asked Jul 7, 2016
4,993 views
Match the following :$\begin{array} {clcl} \text{(i)}& \text{Regular grammer} & \text{(a)} & \text{Pushdown automaton} \\ \text{(ii)}& \text{Context free grammer} & \tex...
3 votes
3 votes
1 answer
2
1 votes
1 votes
1 answer
4