Theory of Computation (3160704) MCQs

MCQs of Context free grammar (CFG)

Showing 1 to 10 out of 36 Questions
1.
Unrestricted grammar is also called_______ Grammar
(a) Type 3
(b) Type 2
(c) Type 1
(d) Type 0
Answer:

Option (d)

2.
A context free grammar is a ___________
(a) English grammar
(b) Regular grammar
(c) Context sensitive grammar
(d) Left linear grammar
Answer:

Option (c)

3.
A CFG consist of :
(a) Set of Nonterminals
(b) Start symbol
(c) Set of terminals
(d) All of these
Answer:

Option (d)

4.
A grammar G = (V, , S, P) in which V represents
(a) Set of Nonterminal
(b) Start symbol
(c) Set of terminals
(d) Production
Answer:

Option (a)

5.
Which of the following statement is not true?
(a) Type 0 grammar is called unrestricted grammar
(b) Chomsky hierarchy define only one grammar
(c) Type 3 grammar is recognized by FA
(d) All of these
Answer:

Option (b)

6.
Context free grammar is called Type 2 grammar because of ______________ hierarchy.
(a) Greibach
(b) Backus
(c) Chomsky
(d) None of the mentioned
Answer:

Option (c)

7.
The language A tB | t generated by which of the following grammar?
(a) Type 0
(b) Type 1
(c) Type 2
(d) Type 3
Answer:

Option (d)

8.
Which of the following is correct for Chomsky hierarchy?
(a) CSL < Unrestricted < CF < Regular
(b) Regular < CFL < CSL < Unrestricted
(c) CFL < CSL < Unrestricted < Regular
(d) None of the mentioned
Answer:

Option (b)

9.
CFG for a+
(a) S aS | a | ^
(b) S aS | b
(c) S aS | a
(d) None of these
Answer:

Option (c)

10.
The minimum number of productions required to produce a language consisting of palindrome strings (even and odd ) over ={a,b} is
(a) 3
(b) 5
(c) 7
(d) 2
Answer:

Option (b)

Showing 1 to 10 out of 36 Questions