- #1
kliker
- 104
- 0
Homework Statement
Σ = {a,b}
find regular expression for
1)all strings that haven't got more than 3 a's
2)all strings that have a number of a's that is divisible by 3
3)all strings that have the substring aaa only one time
The Attempt at a Solution
1) b*Ub*ab*Ub*ab*ab*Ub*ab*ab*ab*
2) (b*Ub*ab*ab*ab*)*
3) b*(aUaaUe)b*aaab*(aUaaUe)b*
can you please tell me if I am correct? this is not homework actually but i didnt know where to post it, I am just preparing myself for the upcoming exams and need to know if i have these correct
thanks in advance