I'm having problem understanding regular expression.
I was trying this exercise:
Over the alphabet {a,b}, create a regular expression that:
A) Accept all the words that contains at least one occurrence 'a' or 'b'.
epsilon*(a U b )
B) Accept all the words that have at maximum three 'a´s'
C)All the words that ends with double letters (eg. abb ou abaa)
epsilon*( aa U bb)
D)The words has exact one occurrence three aaa( eg. abaaab or baaab)
So, as you can see i'm having a lot of problems with regular expressions, i did the A and C ,but i think they're wrong, B e D i have no idea how to do.
Can i have some help..