# Generating finite automata from regular expression [duplicate]

Right now I am trying to learn how to work with automata and regular grammar, and I encountered the following exercise:

$(1^*01)11$

I found the following solution, but I am not really sure if it's right.

What I didn't understand it's from where exactly I should continue after I close the parenthesis or start a new one (let's say the expression was $11(1^*01)$ . When I start the parenthesis and I have A ->1B -> 1C, do I continue the automata after the C or I return to A?

Thank you.

## marked as duplicate by David Richerby, Evil, D.W.♦Jan 26 '18 at 20:07

• You'd continue the automaton.However, in this example, you don't need the parentheses at all. Could you find the FA corresponding to $1^*0111$? That's the same expression as the one in your post. You'd need parens for something like $(10)^*$ or $01(1+01)$. – Rick Decker Jan 26 '18 at 14:55