I need help with the following exercise:

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

i already tried this exercise with nerode but i didnt come to a solution please help me thank you guys

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.)

  • 1
    $\begingroup$ 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. $\endgroup$ – Dave Clarke May 23 '12 at 15:03
  • 1
    $\begingroup$ 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). $\endgroup$ – Raphael May 23 '12 at 15:25
  • 1
    $\begingroup$ 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. $\endgroup$ – Raphael May 23 '12 at 15:26
  • $\begingroup$ how can i solve it please raphael tell me $\endgroup$ – Sad Golduhren May 23 '12 at 16:14
  • $\begingroup$ @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. $\endgroup$ – Gadi A May 27 '12 at 13:16

I wouldn't go for nerode. There is a standard proof for the equivalence of regular expressions and automata and building an automata for a given regexp is the easier part. Read it!

The basic idea: For the "A|B" operation, build an automata that "guesses" if to run the automata of A or the one of B; for "A*B" build an automata that runs A, and whenever it reaches an accepting state "guesses" whether to jump to the start of B; and for A* build an automata that runs A and whenever it reaches an accepting state "guesses" whether to start over or continue.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.