0
$\begingroup$

The steps in reversal of DFA are :-

  1. Make final state as initial state. If there are more than 1 final state, then make a new start state with epsilon transitions to these states.

  2. Change all initial states to final states

  3. Reverse the direction of edges.

Now what if I have a state which is both initial and final ? Will it be initial or final state in the reversed dfa?

$\endgroup$
2
$\begingroup$

Yes. It will be both initial and final in the reversed automaton.

(Separately: If you want the reversed automaton to be a DFA, you may have to be a bit careful about your construction for reversing a DFA, as DFAs are not allowed to contain epsilon transitions.)

$\endgroup$

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.