0

I want to make the regular expression of this language but I can't: I tried but the regular expression didn't match some strings that it should. Is it even possible?

enter image description here

David Richerby
  • 82,470
  • 26
  • 145
  • 239
user5948
  • 1
  • 1

1 Answers1

2

Every DFA can be converted to a regular expression, so you must have made a mistake when you converted. The conversion is quite fiddly, so making a mistake with a nine-state automaton is easy to do, unfortunately.

It might help if you split the automaton in two: if the automaton accepts, it either reads an $a$ and then accepts using only states $2,4,6,\omega$ or it reads a $b$ and then accepts using only states $3,5,7,\omega$. So the regular expression must be something of the form $aR_{\{2,4,6,\omega\}}+bR_{\{3,5,7,\omega\}}$, where $R_S$ is the regular expression for the automaton that just has the states in $S$. Now, you just have to convert two nearly identical four-state automata, which should be easier to do correctly.

David Richerby
  • 82,470
  • 26
  • 145
  • 239