Question

Consider the languages L1L_1, L2L_2 and L3L_3 as given below.

L1={0p1q∣p,q∈N}L_1 = \{0^p 1^q \mid p, q \in \mathbb{N}\}

L2={0p1q∣p,q∈N and p=q}L_2 = \{0^p 1^q \mid p, q \in \mathbb{N} \text{ and } p = q\}

L3={0p1q0r∣p,q,r∈N and p=q=r}L_3 = \{0^p 1^q 0^r \mid p, q, r \in \mathbb{N} \text{ and } p = q = r\}

Which of the following statements is NOT TRUE?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2011 answer key

Solution

Classify languages L1, L2, and L3 within the Chomsky hierarchy.

  1. Language L1={0p1q∣p,q≥0}L_1 = \{0^p 1^q \mid p, q \ge 0\} has independent counts pp and qq, generated by the regular expression 0∗1∗0^* 1^*. Therefore, L1L_1 is regular, and any regular language can be recognized by a PDA and a Turing machine.
  1. Language L2={0p1p∣p≥0}L_2 = \{0^p 1^p \mid p \ge 0\} requires matching a single count between 0s and 1s, which is a deterministic context-free language recognized by a PDA.
  1. Language L3={0p1p0p∣p≥0}L_3 = \{0^p 1^p 0^p \mid p \ge 0\} requires simultaneous matching of three counts across separated blocks. By the pumping lemma for context-free languages, L3L_3 is NOT context-free; it is a context-sensitive language recognized by a linear-bounded automaton or Turing machine.
  1. Therefore, statement C ("All the three languages are context free") is FALSE.
Final answer

C

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2011 Computer Science and Information Technology (CS)
Question
26 of 65, printed as CS Q.26
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.