GATE | GATE CS Mock 2018 | Question 53
Which of the following language(s) generates more than one parse tree for a string ?
L1 = {a^nb^mc^md^n ∈ {a, b, c, d}* | n, m ≥ 0}
∪ {a^nb^nc^md^m ∈ {a, b, c, d}* | n, m ≥ 0}
L2 = {a^nb^mc^m ∈ {a, b, c}* | n, m ≥ 0}
∪ {a^nb^nc^m ∈ {a, b, c}* | n, m ≥ 0}
L3 = {a^nb^mc^p ∈ {a, b, c}* | n ≠ m; n, m ≥ 0}
∪ {a^nb^mc^p ∈ {a, b, c}* | m ≠ p; n, m ≥ 0}
(A) Only L1 and L2
(B) Only L1 and L3
(C) Only L2 and L3
(D) All L1, L2, and L3
Answer: (D)
Explanation: All given languages are inherently ambiguous and generates more than one parse tree for some string(s).
Option (D) is correct.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 1999 | Question 36
- GATE | GATE CS Mock 2018 | Question 39
- Top 5 Topics for Each Section of GATE CS Syllabus
- How to prepare in Last 10 days to score high in GATE?
- Aptitude | GATE IT 2006 | Question 7
- Aptitude | GATE IT 2006 | Question 8
- GATE | GATE CS 2013 | Question 1
- GATE | GATE CS 2013 | Question 3
- GATE | GATE CS 2013 | Question 4
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 6
- GATE | GATE CS 2013 | Question 7
- GATE | GATE CS 2013 | Question 8
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 65



