Can we transfer every DFA to DFAs with start state having no in edge?

72 Views Asked by At

The start state cannot have any "in edge" (an arrow point directly to the start state) and only out edge is possible for the start state. Other states except the start state are free of limit in DFA

I have doubt between two awnsers which are :

1.It depends on the language and is not possible for every DFA

2.YES we can

1

There are 1 best solutions below

3
Patrick87 On

We can, and here is a construction to do it.

Suppose you have a DFA with one or more transitions returning to the initial state. Call the initial state q0. Then for some states q and symbols s, f(q, s) = q0, where f is the transition function.

The initial state q0 has transitions of the form f(q0, s) = qs for each symbol s in the alphabet.

Create a new state q0' and adjust the transition function f as follows:

  • any transitions of the form f(q, s) = q0, change to f(q, s) = q0'
  • transitions of the form f(q0', s) = q' are added for all transitions of the form f(q0, s) = q'.

Basically, we can create a new state that mimics the initial state (it transitions to other states in the same way) and then make any transitions that would normally have returned to the initial state go to the mimic instead. The behavior of the DFA will remain unchanged despite never returning to the initial state.

Of course, q0' should be accepting if and only if q0 is.