Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE-CS-2015 (Set 3) | Question 42

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Which of the following languages are context-free?

L1 = {ambnanbm ⎪ m, n ≥ 1}
L2 = {ambnambn ⎪ m, n ≥ 1}
L3 = {ambn ⎪ m = 2n + 1} 

(A) L1 and L2 only
(B) L1 and L3 only
(C) L2 and L3 only
(D) L3 only


Answer: (B)

Explanation: We can build a push down automata for L1 and L3, but can not build push down automata for L@.

Note that a PDA can uses a stack. L1 and L3 can be identified using a single stack, but L2 can’t be.



Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 08 Oct, 2021
Like Article
Save Article
Similar Reads