in Theory of Computation
1 flag 36 views
0 votes
0 votes
Give a regular expression for L = {anbm: n ≥ 1,m ≥ 1,nm ≥ 3}
in Theory of Computation
1 flag
5 points

1 comment


1 Answer

0 votes
0 votes

here condition  nm >= 3 , for this minimum possible values satisfying these for (n,m) are (1,3),(3,1),(2,2) so these are minimum no of a’s and b’s can have  together in any expression.

so, (abbb,aaab,aabb) are min length strings And can have any no. of a’s in left side and b’s  in right  side of these strings.

So we can write it as, 

 a*(abbb +  aaab + aabb)b*

=> a*a(bb + aa + ab)bb*

=> a*a(bb + a(a+b) )bb*


So the regular expression for  {anbm: n ≥ 1,m ≥ 1,nm ≥ 3}  is  a*a(bb + a(a+b) )bb*.


Correct me If I’m Wrong :)

301 points
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.