Open in App
Not now

GATE | GATE CS 2011 | Question 65

• Last Updated : 08 Oct, 2021

Consider the language L1,L2,L3 as given below.
L1={ | p,q N}
L2={ | p,q N and p=q}
L3={ | p,q,r N and p=q=r}

Which of the following statements is NOT TRUE?
(A) Push Down Automata (PDA) can be used to recognize L1 and L2
(B) L1 is a regular language
(C) All the three languages are context free
(D) Turing machine can be used to recognize all the three languages

Answer: (C)

Explanation: L1 is regular. Its DFA is given as



L2 is not regular, can be proved using pumping lemma (refer to Ullman). But L2 is CFL.

        S → AB
A → 0A|ε
B → 1B|ε

L3 is not CFL, can be proved using pumping lemma (refer to Ullman). But L3 is Recursive.

Every regular language is also a CFL. So PDA can be used to recognized L1 and L2.
As a CFL and Regular language is algo a Recursive language. Hence, Turing machine can be used to recognise
L1, L2 and L3.
L2 is not regular, can be proved using pumping lemma (refer to Ullman). But L2 is CFL.

        S → AB
A → 0A|ε
B → 1B|ε

L3 is not CFL, can be proved using pumping lemma (refer to Ullman). But L3 is Recursive.

Every regular language is also a CFL. So PDA can be used to recognised L1 and L2.
As a CFL and Regular language is algo a Recursive language. Hence, turing machine can be used to recognise
L1, L2 and L3.

My Personal Notes arrow_drop_up
Related Articles