Regular Grammar


Q1.

What is the highest type number that can be assigned to the following grammar?S \rightarrow A a, A \rightarrow B a, B \rightarrow a b c
GateOverflow

Q2.

Consider the regular grammar below S \rightarrow bS \mid aA \mid \epsilon A \rightarrow aS \mid bA The Myhill-Nerode equivalence classes for the language generated by the grammar are
GateOverflow

Q3.

Consider the following grammar G: Let Na(w) and Nb(w) denote the number of a's and b's in a string w respectively. The language L(G)\subseteq \{a,b\}^{+} generated by G is
GateOverflow

Q4.

Consider the following two statements: P: Every regular grammar is LL(1) Q: Every regular set has a LR(1) grammar Which of the following is TRUE?
GateOverflow

Q5.

Consider the alphabet \Sigma={0, 1}, the null/empty string \lambda and the sets of strings X_{0}, X_{1}, \; and \; X_{2} generated by the corresponding non-terminals of a regular grammar. X_{0}, X_{1}, \; and \; X_{2} are related as follows. X_{0}=1X_{1} X_{1},=0X_{1}+1 X_{2} X_{2}=0X_{1}+ \{\lambda\} Which one of the following choices precisely represents the strings in X_{0}?
GateOverflow

Q6.

Choose the correct alternatives (More than one may be correct).Let R_{1} and R_{1} be regular sets defined over the alphabet \Sigma Then:
GateOverflow