851 views

2 Answers

Best answer
5 votes
5 votes

Yes a*b* -- Regular one ( It can take any number of a and b ) 

anb---- An equal no of a and equal no of b 

The regular lang is accepted By a Finite state Automata . It doesnt have any memory with it .

So for the first one it doesnt have any restriction to keep track how much a and how much b it has read . it wouldnt  have restriction of a, b, aaabbbbbb, abbbb,bbbbb , aabb etc 

While for the second , if it has read 3 a then it should read 3 b also , but FA doesnt have memory only , it read 3 a and then when it start reading b , it doesnt have any idea about how much a it read . 

Hence the second one is non regular :)

I hope it help you ! 

selected by
1 votes
1 votes

 a*b* = write any no. of a and any no. of b without any condition.  ( so we can design finite automata for this which take 2 state , when we able to make FA then these language are Regular)

ex:  am bn  here m and n are diffrent variable so we have no restriction of no. of a and no. of b are equal , less than , greater than etc.

 an bn = always as no. of a equal to no. of b.. so we cannot create FA for it. B/C comparision is present b/w a and b. ( when comparission present then not regular ) ex. an bn chere comparision present among a,b,c. always equal no. of a,b,c.

Related questions

1 votes
1 votes
1 answer
4