# NFA from regular expression

I'm trying to make an NFA from the following regular expression.

I'm not sure about the edges between nodes $q2$ and $q4$, maybe someone can point out where everything went wrong.

-
Is the empty word ($\lambda$) allowed as input?? –  Berci Oct 6 '13 at 0:49
yes. $q6$ could maybe be the final state and $a$ might be another edge $q5 \to q6$ and cut out $q7$ completely. I'm wondering if that would be better –  stackuser Oct 6 '13 at 2:09

You should merge $q_2$ and $q_4$ and remove the $\lambda$-transitions between them, but keep the transition labelled by $c$. You should also replace $q_6 \xrightarrow{a} q_7$ by $q_5 \xrightarrow{a} q_7$. The states $q_6$ and $q_7$ should then be both final.
I'm not sure why to merge $q2$ and $q4$. Is it just wrong or is it just extraneous? –  stackuser Oct 6 '13 at 17:08
It is not wrong, but it is really unnecessary. Indeed, you have two transitions $q_2 \xrightarrow{\lambda} q_4$ and $q_4 \xrightarrow{\lambda} q_4$ so you can freely pass from $q_2$ to $q_4$ and back. –  J.-E. Pin Oct 6 '13 at 21:09