Context Free Grammar

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which of the following language accepted by a Push down Automata?
Type0
Type1
Type2
Type3
Explanation:
A known fact that type 2 grammar is accepted by PDA.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
A context free language is called ambiguous if _________
It has 2 or more left derivations for some terminal string Ñ¡ Ñ” L (G)
It has 2 or more right derivations for some terminal string Ñ¡ Ñ” L (G)
It has 2 or more left & right derivations for some terminal string Ñ¡ Ñ” L (G)
None of the mentioned
Explanation:
A context-free grammar (CFG) is a set of recursive rewriting rules (or productions) used to generate patterns of strings.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
Automaton accepting the regular expression of any number of a’ s is ___________
a*
ab*
(a/b)*
a*b*c
Explanation:
It gives any number of a’s.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
A regular Grammar is a _________
CFG
Non CFG
English Grammar
None of the mentioned
Explanation:
Regular grammar is CFG. It restricts its rules to a single non terminal on left hand side.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
Assume the statements S1 and S2 given as:
S1 is correct and S2 is not correct
Both S1 and S2 are correct
Both S1 and S2 are not correct
S1 is not correct and S2 is correct
Explanation:
The proof of S1 can be seen in various book of theory of computation but s2 is a problem of category undecidable so a contradiction to this assumption can be easily obtained.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
Which of these does not belong to CFG?
Terminal Symbol
Non terminal Symbol
Start symbol
End Symbol
Explanation:
CFG consists of terminal non terminal start symbol set of production rules but does not have an end symbol.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
Recursively enumerable languages are not closed under ______________
Union
Intersection
Complementation
Concatenation
Explanation:
Recursive languages are closed under the following operations.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
Given the following statements: (i) Recursive enumerable sets are closed under complementation. (ii) Recursive sets are closed under complements. Which is/are the correct statements?
I only
II only
Both I and II
Neither I nor II
Explanation:
Recursive languages are closed under the following operations.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
Which of the following conversion is not possible (algorithmically)?
Regular grammar to CFG
NDFA to DFA
NDPDA to DPDA
NDTM to DTM
Explanation:
Not every NDPDA has an equivalent deterministic PDA.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Push down automata accepts which language?
Context sensitive language
Context free language
Recursive language
None of the mentioned
Explanation:
PDA accepts CFG.