In the alphabet {a, b} for both automata and regular expressions, what would be four words that belong to the language of this regular expression and four which do not, regular expression = ((a|baa)∗(b|ab))∗
Im not too sure on this, but would 'aaa' be one that does belong and 'bb' be one that doesn't belong. And what are some other ones
Trying to rephrase the expression... the expression
(a|baa)*(b|ab)can be described as the following: (Step 1) Append any number (including zero) of eitheraorbaato the string. (Step 2) Append abor anabto the current word (not optional). Now, taking that expression, wrapping it in parentheses, and following it by a star means that we perform that whole process any number of times, possibly including zero. So, 'aaa' would not have been possible since thanks to the Step2 as written above, there obviously must have been abincluded somehow.I leave finding more examples to you.
$~$
As an extra problem, try to prove to yourself whether your language is actually equivalent to
(((a|b)*b)|ϵ), i.e. the empty string or any string made ofa's and/orb's so long as it ends with ab.