I searched google and in many pages it is given that in Minimized DFA dead state or trap state is removed. My question is how can it be still a DFA if some transition is undefined. So what you say people?
3 Answers
Even minimal DFAs must include dead states; otherwise, they're either (a) not DFAs or (b) not accepting the same language as their non-minimal counterparts. For instance, a minimal DFA for the language {a} over alphabet {a, b} must have 3 states: a start state where you can see a and accept; an accepting state where you reject if you see anything else; and a dead state where you go if you see a b or anything in the accepting state.
Never heard of omitting dead states from minimal DFAs. Blasphemy!

- 27,682
- 3
- 38
- 73
-
Look at this [page](http://www.cs.odu.edu/~toida/nerzic/390teched/regular/fa/min-fa.html). According to this dead state are removed from DFA. – Prashant Bhardwaj Feb 04 '12 at 14:03
-
1@PrashantBhardwaj That's a weird, weird, weird rule to have. For one, what they're calling minimal DFAs, I would call NFAs (DFAs can't "crash"). Second, the definition is at odds with the Myhill-Nerode theorem. I wouldn't use course notes from Old Dominion University as your only reference for this. What do MIT, Harvard, Oxford, Yale, Stanford, Cambridge, etc. have to say on the matter? You'll only ever need a single dead state in a minimal DFA, anyway... not sure why you'd remove this. Bizarre. – Patrick87 Feb 04 '12 at 14:11
-
So would I call that a NFA. I also searched lecture notes of UIUC's course on Theory of Computation. There is nothing there about removing dead state. But these are the few links I encountered. [Link1](www.cs.fsu.edu/~whalley/cop5621/chap3.handout.pdf) [Link2](en.wikipedia.org/wiki/DFA_minimization) [Link3](code.google.com/p/regex/) In fact in some compilers book it has been given. – Prashant Bhardwaj Feb 04 '12 at 14:19
-
2@PrashantBhardwaj All I can say is this: maybe for real-life applications where you're writing software to generate DFAs to parse data, it makes a lot of sense to let DFAs crash as soon as you're not matching the pattern. In the theory of computation, formal languages and grammars/automata, it does not make much sense. To be fair, you could define DFAs in such a way as to allow them to crash, but until right now, I had never been aware of such a definition. I would never remove a dead state from a minimal DFA since doing so would be ugly in light of Myhill-Nerode. It's ugly micro-optimization. – Patrick87 Feb 04 '12 at 14:30
-
@PrashantBhardwaj : Patric is right the link which you mentiend http://www.cs.odu.edu/~toida/nerzic/390teched/regular/fa/min-fa.html : That are completely weird rule i saw in dfa we have transaction for each input symbol but after minimization and removel of dead state he come up with NFA instead of DFA. – Nishant Kumar Sep 26 '12 at 07:05
-
@Patrick87 So, If there is a question like " what is the minimum number of states required to accept the language L, ?" should the answer count trap states? or not? – Vishwanath gowda k Jan 26 '16 at 18:22
Dead states are not removed in the 'minimal' versions, but yes they are lost during 'reversals' of DFAs(probably you got the terms mixed up)

- 1
@PrashantBhardwaj : I also think that it(dead state and corresponding dead moves) should be included because including it would complete the DFA i.e., we won't have any anonymous moves on a particular state in a minimized DFA by considering it.
Still, the question is un-answered? Finally, should we include it or not? Could anyone certify it ?

- 770
- 1
- 6
- 18
-
"deterministic finite state machine—is a finite state machine that accepts/rejects finite strings of symbols and only produces a unique computation (or run) of the automation for **each input string** ." **Source** : Wikipedia on DFA. If a particular move is not defined, this alone gives a reason to include a dead state. If not included then would it be fair to call it a DFA ? – ypahalajani Sep 07 '15 at 05:52