Computer Science And Engineering

Computer Science And EngineeringTheory of Computation / FLATMultiple Choice (MCQ)2 Marks
Q2.

Consider the following two languages over the alphabet {a,b,c}\{a, b, c\}, where mm and nn are natural numbers.

L1={ambmcm+nm,n1}L_1 = \{a^m b^m c^{m+n} \mid m, n \geq 1\}

L2={ambncm+nm,n1}L_2 = \{a^m b^n c^{m+n} \mid m, n \geq 1\}

Which ONE of the following statements is CORRECT?

A
Both L1L_1 and L2L_2 are context-free languages.
B
L1L_1 is a context-free language but L2L_2 is not a context-free language.
C
L1L_1 is not a context-free language but L2L_2 is a context-free language.
D
Neither L1L_1 nor L2L_2 are context-free languages.