440 views
0 votes
0 votes
(a+b)^* a^n b^n     n>=1

1 Answer

2 votes
2 votes
This is CFL , since u have to keep track of no of a's with no of b's , which can't be done by a finite automaton therefore u need to design a PDA for it. Changing $n >=1$ to $n >= 0$ can make it regular as then the given language will be reduced to $(a+b)^*$.

Related questions

5 votes
5 votes
2 answers
1
Akanksha Kesarwani asked Dec 13, 2015
5,275 views
Which of the following language is $CFL$?a. $\{a^mb^nc^n\;|\;m!=n\}$b. $\{a^mb^nc^k\;|\;if\,(m=n)\,then\,(n!=k)\}$c. $\{a^mb^nc^k\;|\;m>n\;or\;n<k\}$d. None of these
0 votes
0 votes
0 answers
3