Question:medium

Consider the following languages: 

\( L_1 = \{ ww \mid w \in \{a,b\}^* \} \) 
\( L_2 = \{ a^n b^n c^m \mid m, n \geq 0 \} \) 
\( L_3 = \{ a^m b^n c^n \mid m, n \geq 0 \} \) 

Which of the following statements is/are FALSE?

Show Hint

Context-free languages are not closed under intersection and complement, which makes problems like checking the complement non-trivial.
Updated On: Jan 30, 2026
  • \( L_1 \) is not context-free but \( L_2 \) and \( L_3 \) are deterministic context-free.
  • Neither \( L_1 \) nor \( L_2 \) is context-free.
  • \( L_2, L_3 \) and \( L_2 \cap L_3 \) are all context-free.
  • Neither \( L_1 \) nor its complement is context-free.
Show Solution

The Correct Option is B, C, D

Solution and Explanation

Let's analyze the properties of the languages \(L_1\), \(L_2\), and \(L_3\) one by one using standard results from formal language theory:

Option (A) – False:
- \(L_1 = \{ ww \mid w \in \{a,b\}^* \}\) is a well-known language that is not context-free. This is because checking equality of two halves requires more than one stack, which a pushdown automaton does not have.
- Since deterministic context-free languages (DCFLs) are a subset of context-free languages (CFLs), \(L_1\) is also not deterministic context-free.
- However, although \(L_2\) and \(L_3\) are context-free, it is incorrect to claim both are deterministic context-free without justification.
Hence, option (A) is false.

Option (B) – True:
- \(L_1\) is not context-free, as explained above.
- \(L_2 = \{ a^m b^m c^n \mid m, n \ge 0 \}\) is context-free. A pushdown automaton can first match \(a^m\) with \(b^m\) using its stack and then freely accept any number of \(c\)'s.
- However, \(L_2\) is not deterministic context-free because a deterministic PDA cannot decide when to stop matching \(a\)'s and begin processing \(c\)'s without nondeterminism.
Therefore, option (B) is true.

Option (C) – False:
- \(L_2 = \{ a^m b^m c^n \mid m, n \ge 0 \}\) is context-free.
- \(L_3 = \{ a^m b^n c^n \mid m, n \ge 0 \}\) is also context-free.
- Their intersection is: \[ L_2 \cap L_3 = \{ a^m b^m c^m \mid m \ge 0 \} \] which is a classic example of a language that is not context-free.
Hence, option (C) is false.

Option (D) – False:
- \(L_1\) is not context-free.
- Context-free languages are not closed under complement. Therefore, no conclusion can be drawn that the complement of a non-context-free language must be context-free.
- In fact, the complement of \(L_1\) is also not context-free.
Hence, option (D) is false.

Final Answer:
Only option (B) is correct.
Was this answer helpful?
0