Skip to content
Official PYQ · 2005

GATE CS 2005 Q55 — Regular and Context-free Languages

Explain with AI

Consider the languages:

L1={anbncm∣n,m>0}L_1 = \left\{ a^nb^nc^m \mid n,m >0\right\}  and L2={anbmcm∣n,m>0}L_2 = \left\{a^nb^mc^m\mid n, m > 0\right\}

Which one of the following statements is FALSE?

Choose one option
View worked solution

Answer: A

Let us analyze the properties of the given languages:

L1={anbncm∣n,m>0}L_1 = \{ a^nb^nc^m \mid n,m > 0 \}

L2={anbmcm∣n,m>0}L_2 = \{ a^nb^mc^m \mid n,m > 0 \}

  • L1L_1 and L2L_2 are Context-Free Languages (CFLs):
    • For L1L_1, we can use a pushdown automaton (PDA) to push aa's onto the stack and pop them matching with bb's, while ignoring the count of cc's.
    • For L2L_2, we can ignore the count of aa's, push bb's onto the stack, and pop them matching with cc's.
    • Thus, both L1L_1 and L2L_2 are CFLs. Statement (C) is TRUE.
  • L1∪L2L_1 \cup L_2 is a CFL:
    • Since the class of context-free languages is closed under union, and both L1L_1 and L2L_2 are CFLs, their union L1∪L2L_1 \cup L_2 is also a CFL.
    • Alternatively, a non-deterministic PDA can make an initial ϵ\epsilon-transition to either match aa's with bb's (for L1L_1) or match bb's with cc's (for L2L_2).
    • Thus, Statement (B) is TRUE.
  • L1∩L2L_1 \cap L_2 is Context-Sensitive but NOT Context-Free:
    • The intersection of L1L_1 and L2L_2 is: L1∩L2={anbncn∣n>0}L_1 \cap L_2 = \{ a^n b^n c^n \mid n > 0 \}
    • This is a classic non-context-free language because it requires comparing three counts (nn of aa's, bb's, and cc's) simultaneously, which cannot be done with a single stack.
    • However, it can be recognized by a Linear Bounded Automaton (LBA), making it a Context-Sensitive Language (CSL).
    • Thus, Statement (D) is TRUE, and Statement (A) is FALSE.

Therefore, the false statement is A.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular and Context-free Languages questions