Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    $\begingroup$ If all else fails, you can always construct three separate regular expressions $R_1$, $R_2$, $R_3$ that correspond respectively to the automata where just the first, second and third state is accepting. And then take $R_1+R_2+R_3$. $\endgroup$ Commented May 5, 2019 at 14:14
  • $\begingroup$ Note that you can have arbitrarily long blocks of bs alternating with blocks of one or two as. $\endgroup$ Commented May 5, 2019 at 14:25