title: How to derive the RegEx from the state diagram?
body: <p>I found a state diagram of a DFA (deterministic finite automaton) with its RegEx in a script, but this diagram is just a sample without any explanations. So I tried to derive the RegEx from the DFA state diagram by myself and got the expression: <code>ab+a+b(a*b)*</code>. I dont understand how I get the original RegEx <code>(ab+a*)+ab+</code> mentioned in the script. Here my derivation:</p>
  
  <p><a href="https://i.stack.imgur.com/hxx5b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hxx5b.png" alt="enter image description here"></a></p>
  
  <p>I am grateful for any help, links, references and hints!</p>