DPDA and Ambiguous Grammars Multiple Choice Questions with Answers
Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “DPDA and Ambiguous Grammars”.
1. CFGs are more powerful than:
a) DFA
b) NDFA
c) Mealy Machine
d) All of the mentioned
View Answer
2. State true or false:
S-> 0S1|01
Statement: No regular expression exists for the given grammar.
a) true
b) false
View Answer
3. For the given set of code, the grammar representing real numbers in Pascal has error in one of the six lines. Fetch the error.
(1)
(2)
(3)
(4)
(5)
(6)
a) 3
b) 4
c) 2
d) No errors
View Answer
4. Which among the following is incorrect with reference to a derivation tree?
a) Every vertex has a label which is a terminal or a variable.
b) The root has a label which can be a terminal.
c) The label of the internal vertex is a variable.
d) None of the mentioned
View Answer
5. Let G=(V, T, P, S)
where a production can be written as:
S->aAS|a
A->SbA|ba|SS
Which of the following string is produced by the grammar?
a) aabbaab
b) aabbaa
c) baabab
d) None of the mentioned
View Answer
6. Statement 1: Ambiguity is the property of grammar but not the language.
Statement 2: Same language can have more than one grammar.
Which of the following options are correct with respect to the given statements?
a) Statement 1 is true but statement 2 is false
b) Statement 1 is false but statement 2 is true
c) Both the statements are true
d) Both the statements are false
View Answer
7. Which of the following are non essential while simplifying a grammar?
a) Removal of useless symbols
b) Removal of unit productions
c) Removal of null production
d) None of the mentioned
View Answer
8. Which of the following are context free language?
a) L={aibi|i>=0}
b) L={wwr| w is a string and r represents reverse}
c) Both (a) and (b)
d) one of the mentioned
View Answer
9. The language L ={ai2bi|i>=0} is:
a) recursive
b) deterministic CFL
c) regular
d) Two of the mentioned is correct
View Answer
10. L->rLt|tLr|t|r
The given grammar produces a language which is:
a) All palindrome
b) All even palindromes
c) All odd palindromes
d) Strings with same begin and end symbols
View Answer
No comments