GATE 2025 set1 · CS · MCQ · 2 marks · Theory of Computation › Context Free Languages
GATE 2025 set1 Computer Science and Information Technology question: Consider the following two languages over the alphabet \ a, b, c\ , where m and n are…
Consider the following two languages over the alphabet {a,b,c}, where m and n are natural numbers.
L1={ambmcm+n∣m,n≥1}
L2={ambncm+n∣m,n≥1}
Which ONE of the following statements is CORRECT?
- (A)
Both L1 and L2 are context-free languages.
- (B)
L1 is a context-free language but L2 is not a context-free language.
- (C)
L1 is not a context-free language but L2 is a context-free language.
- (D)
Neither L1 nor L2 are context-free languages.
Show answer
Official answer: C
Practise this question with exam-style marking