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 the language

$L=\{a^n b^m:n\ge 4,m\le 3\}$

Which of the following regular expression represents language $L$?





Solution

$n\ge 4$

So, at least $4$ symbols $a$ are compulsory.

This is represented by:

$aaaaa^*$

Also,

$m\le 3$

So, number of $b$ can be $0,1,2,$ or $3$.

This is represented by:

$\lambda+b+bb+bbb$

Therefore, required regular expression is:

$aaaaa^*(\lambda+b+bb+bbb)$


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...