Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



Consider $L=L_1\cap L_2$ where

$L_1=\{0^m1^m20^n1^n\mid m,n\ge 0\}$

$L_2=\{0^m1^n2^k\mid m,n,k\ge 0\}$

Then, the language $L$ is





Solution

In $L_1$, after symbol $2$, we have $0^n1^n$.

But in $L_2$, after symbol $2$, no $0$ or $1$ can appear.

So, for intersection, $n=0$ in $L_1$.

Thus,

$L=\{0^m1^m2\mid m\ge0\}$

This language is context free but not regular.


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...