1,126 views
0 votes
0 votes

S -> AaB

A -> aC | $\epsilon$

B -> aB | bB | $\epsilon$

C -> aCb | $\epsilon$

Is the regular expression for the above is this:

a(a + b)* a ( a* + b* )*  ?

1 Answer

0 votes
0 votes
It should be (a(a+b)*)+a(a^nb^n)

because here minimum one "a" is must and by the production B we will get all string of "a and b"

But at the same time by the production C we will get string in a and b will be equal.

Related questions

1 votes
1 votes
1 answer
1
prabhath challa asked 6 days ago
55 views
what will be the regular expression of this DFA using Arden's theorem
0 votes
0 votes
1 answer
2
hasina ali asked Mar 21
90 views
Set of binary strings starting with 11 and ending with 00. E.g., 1100,1110100 ,1100100
0 votes
0 votes
1 answer
3
utsav22222 asked Mar 15
131 views
Write regular expression for the set of strings of 0's and 1's with at most one pair of consecutive 1's.