-1

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

Raphael
  • 72,336
  • 29
  • 179
  • 389

1 Answers1

1

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.

Gadi A
  • 223
  • 1
  • 6