# construct regular expression

I need help with the following exercise:

Construct an $\varepsilon$-NFA for the following regular expression $(a|\varepsilon)(ba)^*(c^*a|bc)^*$.

Source wiki Nerode : (Given a language L, and a pair of strings x and y, define a distinguishing extension to be a string z such that exactly one of the two strings xz and yz belongs to L. Define a relation RL on strings by the rule that x RL y if there is no distinguishing extension for x and y. It is easy to show that RL is an equivalence relation on strings, and thus it divides the set of all finite strings into equivalence classes.

The Myhill–Nerode theorem states that L is regular if and only if RL has a finite number of equivalence classes, and moreover that the number of states in the smallest deterministic finite automaton (DFA) recognizing L is equal to the number of equivalence classes in RL. In particular, this implies that there is a unique minimal DFA with minimum number of states.)

• Myhill-Nerode doesn't seem to be the right thing to use. Read your notes a bit more carefully. Look at the proof showing that regular expressions and finite state automata are equally expressive. – Dave Clarke May 23 '12 at 15:03
• Note the hints in the comments of this duplicate. I will let this question remain open for now because it does show some effort (however misguided). – Raphael May 23 '12 at 15:25
• On topic: nothing in the Myhill-Nerode theorem helps you constructing an automaton. It is used to prove that some lanugage is not regular; see here. – Raphael May 23 '12 at 15:26
• how can i solve it please raphael tell me – Sad Golduhren May 23 '12 at 16:14
• @Raphael, this is incorrect; given that you can easily characterize the equivalence classes of the Myhill-Nerode equivalence relation, the construction of the optimal automata easily follows. – Gadi A May 27 '12 at 13:16