573 views

2 Answers

0 votes
0 votes

 ambn / m,n>=1

The strings in this language are {ab, aab, abb, aabb, aaab, abbb ... }. The language for this would be :

S -> aS / aB

B -> bB / b

we can make a NFA  for this language so it is regular.

anbn / n>=1

The strings in this language will be { ab, aabb, aaabbb ...}. For every string in this language we have to check whether the number of a's are equal to the number of b's which would require some memory to store the number of a's for checking with b's which cannot be done by a NFA so this is not regular.

0 votes
0 votes

because for ambyou  don't have to count i.e keep track of values of n and m they can be anything

but in case anbn we have to count #a's and #b''s  and to count we need memory  i.e. stack and it is known if any language can't be 

represented as finite automata is not REGULAR

Related questions

0 votes
0 votes
2 answers
1
Abhipsa asked Jan 21, 2019
1,554 views
Is this language regular? If yes, how?L = {wxwR | x, w ϵ {0, 1}*}wR is reverse of string w. Thank you!
0 votes
0 votes
0 answers
3
0 votes
0 votes
2 answers
4