459 views

1 Answer

Best answer
1 votes
1 votes
It's a REGULAR language,.
If n>=1 or anything it's just a (a+b)*

Now, you have choice to take n as any number.

Consider every string as a part of
(a+b)* and if n>=1 then start string with 'a' and End that string with just 'b' and if n>=0 then it's simply a (a+b)*
(Like we do this in palindrome's sums)

FA:
(a,b)--a-->(a,b)--b-->()

For eg. String is bababaabb
(bab) a (baab) b
selected by

Related questions

0 votes
0 votes
0 answers
1
Vedantthakkar asked Feb 24
161 views
Consider a regular language R and a context free language C. Let the PDA that recognizes C be called P=(QP,∑,Γ,δP,q0P,FP), and the DFA that reconginzes R be (QR...
2 votes
2 votes
3 answers
2
0 votes
0 votes
1 answer
3
mehul vaidya asked Sep 3, 2018
542 views
To find intersection of this two : If i proceed like thisregular ∩ CFG CFG ∩ CFG as regular lang is also CFGbut CFG is not closed under intersectionhence answer ma...
0 votes
0 votes
0 answers
4
mehul vaidya asked Aug 25, 2018
425 views
will intersection of regular and context free be always CF? I don't think so , because regular Language is also cf hence CFL intesect CFL is no always CFLref: https://gat...