697 views

2 Answers

Best answer
5 votes
5 votes

S → A a B

A → aC | ∈

C → a C b | ∈

Now it look like,

1) when A ≠ ∈,   a  an . bn . a. B , where n ≥ 0  ===> looking like CFL

what about B ?

B → a B | b B | ∈  ===> (a+b)m , m ≥ 0

Finally, it is like a an . bn . a (a+b)m , m ≥ 0, n ≥ 0

===> we can convert it  a a (a+b)m , m ≥ 0 , by taking always n=0

2) when A = ∈ ===> a. B ===> a. (a+b)m , m ≥ 0

Total RE = a a (a+b)m + a. (a+b)m  = a. (a+b), m ≥ 0

selected by
0 votes
0 votes
No it is not.See if it is to be a regular language then it must be accepted by a FA.So there must exist one regular expression for the above grammar.There is no such regular expression for this grammar so it is not a regular language its is a CFL.There is a dependency of "a" if we have to print a "b" just before the starting terminal "a".For printing 1 b there should be 1+1 "a"s,similarly for n "b"s there must be n+1 "a"s.So its not a regular language.

 

 

P.S-correct me if i am wrong ty :-).

Related questions

4 votes
4 votes
3 answers
1
1 votes
1 votes
1 answer
2
Na462 asked Sep 11, 2018
1,588 views
Is Language L = {0(n+m) 1(k+l) | m = l, and m,n,k,l ≥ 1 } a regular language ? explain
0 votes
0 votes
1 answer
4
M_Umair_Khan42900 asked Dec 29, 2022
785 views
Show that the following pairs of regular expressions define the same language over the alphabet I = [a, b].s(a) p(pp)*( A + p)q + q and p*q(b) A +0(0+1)* + (0+1)* 00(0+1)...