title: Constructing a Regular Expression from a Finite Automata
body: <p>I'm trying to construct a regular expression from a Finite Automaton but found my self completely stuck with this one. The regex to use is like this:</p>
  
  <p>? = 0 or 1<br>
  * = 0 or more<br>
  += 1 or more<br>
  | = or<br>
  _ = empty string<br>
  @ = empty set<br>
  () = parentheses</p>
  
  <p>As I understand the strings must either be "b*" end with "a*" or end with "a+bb+"<br>
  What i have now is <code>((b*(a+(bb))*)*)</code>
  but that doesn't take into account a string ending with 'a'.  </p>
  
  <p>As said, I'm 100% stuck with this and just can't get my head around how I am supposed to work with this.</p>
  
  <p>image: <a href="http://img593.imageshack.us/img593/2563/28438387.jpg" rel="nofollow">http://img593.imageshack.us/img593/2563/28438387.jpg</a>  </p>
  
  <p>CODE:<br>
  Type of the automaton<br>
  FA  </p>
  
  <p>States<br>
  q1<br>
  q2<br>
  q3<br>
  q4  </p>
  
  <p>Alphabet<br>
  a<br>
  b  </p>
  
  <p>Initial state<br>
  q3</p>
  
  <p>Final states<br>
  q3<br>
  q4  </p>
  
  <p>Transitions<br>
  q1 a q2<br>
  q1 b q3<br>
  q2 a q2<br>
  q2 b q2<br>
  q3 a q4<br>
  q3 b q3<br>
  q4 a q4<br>
  q4 b q1</p>
  
  <p>Any solutions or tips appreciated!</p>