NEW
Font size
WorksheetsTOC Unit-4
Total questions: 15
Worksheet time: 8mins
Inorder to simplify a context free grammar, we can skip the following operation:
Removal of null production
Removal of useless symbols
Removal of unit productions
None of the mentioned
In context to the process of removing useless symbols, which of the following is correct?
We remove the Nullable variables
We eliminate the unit productions
We eliminate products which yield no terminals
All of the mentioned
Given grammar G:
S->aS|A|C
A->a
B->aa
C->aCb
Find the set of variables that can produce strings only with the set of terminals.
{C}
{A,B}
{A,B,S}
None of the mentioned
Suppose A->xBz and B->y, then the simplified grammar would be:
a) A->xyz
b) A->xBz|xyz
c) A->xBz|B|y
d) none of the mentioned
The variable which produces an epsilon is called:
a) empty variable
b) nullable
c) terminal
d) all of the mentioned
Which among the following is the format of unit production?
a) A->B
b) A->b
c) B->Aa
d) None of the mentioned
Given grammar:
S->aA
A->a
A->B
B-> A
B->bb
Which of the following is the production of B after simplification by removal of unit productions?
a) A
b) bb
c) aA
d) A| bb
Which of the production rule can be accepted by Chomsky grammar?
a) A->BC
b) A->a
c) S->e
d) All of the mentioned
Let G be a grammar: S->AB|e, A->a, B->b
Is the given grammar in CNF?
a) Yes
b) No
The format: A->aB refers to which of the following?
a) Chomsky Normal Form
b) Greibach Normal Form
c) Backus Naur Form
d) None of the mentioned
The pumping lemma is often used to prove that a language is:
a) Context free
b) Not context free
c) Regular
d) None of the mentioned
Which of the expressions correctly is an requirement of the pumping lemma for the context free languages?
a) uvnwxny
b) uvnwnxny
c) uv2nwx2ny
d) All of the mentioned
The context free languages are closed under:
a) Intersection
b) Complement
c) Kleene
d) None of the mentioned
Which of the following does not obey pumping lemma for context free languages ?
a) Finite languages
b) Context free languages
c) Unrestricted languages
d) None of the mentioned
Which of the following grammars are in Chomsky Normal Form:
a) S->AB|BC|CD, A->0, B->1, C->2, D->3
b) S->AB, S->BCA|0|1|2|3
c) S->ABa, A->aab, B->Ac
d) All of the mentioned
