recategorized by
4,904 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

5.2k
views
2 answers
2 votes
go_editor asked Jul 7, 2016
5,150 views
Match the following : ... )-(d)}$\text{(i)-(c), (ii)-(b), (iii)-(d), (iv)-(a)}$
4.6k
views
1 answers
3 votes
go_editor asked Jul 7, 2016
4,597 views
The regular expression for the following DFAab*(b+aa*b)*a*b(b+aa*b)*a*b(b*+aa*b)a*b(b+aa*b)*
2.9k
views
2 answers
1 votes
go_editor asked Jul 7, 2016
2,852 views
The following CFG $S \rightarrow aB \mid bA, A \rightarrow a \mid as \mid bAA, B \rightarrow b \mid bs \mid aBB$ generates strings of terminals that haveodd number of a ... of b'sequal number of a's and b'snot equal number of a's and b's
4.1k
views
1 answers
1 votes
go_editor asked Jul 7, 2016
4,092 views
Consider the regular expression (a+b)(a+b) ..... (a+b) (n-times). The minimum number of states in finite automaton that recognizes the language represented by this regular expression containsn statesn+1 statesn+2 states2$^n$ states