326 views
1 votes
1 votes

what will be the resulting lang?

I am thinking it as regular although it may clearly seem to be CFL using closure properties, but inclusion of an in the union already take into consideration all strings derived from the CFL part i.e. anbn 

Hence we can short-circuit that part?

P.S: Answer given is NOT REGULAR

2 Answers

1 votes
1 votes
above language is CFL because we can make PDA for it easily.if it's regular then dfa will formed but i think there is no way to make a dfa for it due to presence of $a^{n}b^{n}.$
1 votes
1 votes

We can write like 

a*+b*+a^nb^n  .

And there are comparision between a and b so we need one stack . And given language is CFL 

Related questions

0 votes
0 votes
3 answers
1
0 votes
0 votes
1 answer
3
amitarp818 asked Nov 18, 2023
234 views
Given L1 = {a*baa*} and L2 = {ab*}The regular expression corresponding to language L3 = L1/L2 (right quotient) is given by