809 views

1 Answer

Best answer
1 1 vote
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
Position:
Show:

Related questions

0 0 votes
0 0 answers
473
473 views
Vedantthakkar asked Feb 24, 2024
473 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 2 votes
3 answers 3 answers
2.3k
2.3k views
jugnu1337 asked Dec 23, 2021
2,348 views
if L1 and L2 are not regular language then L1 union L2 is not regular.this statement is true or false?my approach is:::true let suppose L1= a^n b^n AND L2= a^k b^kbot...
0 0 votes
1 1 answer
884
884 views
mehul vaidya asked Sep 3, 2018
884 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 may no...
0 0 votes
0 0 answers
686
686 views
mehul vaidya asked Aug 25, 2018
686 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...