(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Σ = {a,b}

find regular expression for

1)all strings that havent 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

3. 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 im correct? this is not homework actually but i didnt know where to post it, im just preparing myself for the upcoming exams and need to know if i have these correct

thanks in advance

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Regular expressions help

**Physics Forums | Science Articles, Homework Help, Discussion**