Discrete Math Quick Regular Expression question! For a regular expression (a | b)*, can I write this string: aaaaaaabbbbbbbbbbbabababbb. I was thinking this means that when I choose a, I can have multiple a's and then I can choose b too after choosing multiple a's. Or is it that once I chose a, I cannot go back and choose b after finishing with a?
Your first interpretation is correct. The second one would correspond to the regular expression $a^*b^*$. But in both cases, don't forget to consider the empty word as well...
$(a|b)*$ means $a$ or $b$ zero or more times. You can only pick $a$ or $b$ at any given iteration
so $bbbbb, aaaaa, ab,$ null, $abaab$ are all correct.