0

I have simple example of NFA->DFA conversion, but I am confused about "q0,q1,q2" state. What is it for? Or maybe I have done something wrong?

Here it is: enter image description here

Lucas
  • 329
  • 1
  • 13
  • Is there a question here? States are states -- asking what they are "for" individually is not very meaningful. What is the FA "for"? Collectively the states and transitions make up a FA that recognizes some language on some alphabet. Individually the states are just part of the automata. – Chris Dodd Jun 25 '17 at 00:26
  • Yeah, you are right - question might have not been clear ;d So, the question is - is that transformation (NFA->DFA) done correctly? FA accepts all strings which contains "ba" in them. – Lucas Jun 25 '17 at 09:53

1 Answers1

1

Yes, it seems you have done the transformation correctly.

But a correct result is not automatically the most efficient one. You could add "b" to the loop of state {q0, q2} and just delete the state {q0,q1,q2} with all the transitions that touch it. Both DFA accept the desired language.

Peter Leupold
  • 1,162
  • 1
  • 9
  • 16