Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE CS 2011 | Question 65

  • Last Updated : 08 Oct, 2021

Consider the language L1,L2,L3 as given below.
L1={0^{p}1^{q} | p,q \in N}
L2={0^{p}1^{q} | p,q \in N and p=q}
L3={0^{p}1^{q}0^{r} | p,q,r \in 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

       gate2011A35

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.

gate2011A35b

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.

Source: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html



Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!