HiveBrain v1.2.0
Get Started
← Back to all entries
patternMajor

Is it mandatory to define transitions on every possible alphabet in Deterministic Finite Automata?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
transitionsalphabetmandatoryfiniteautomataeverypossibledefinedeterministic

Problem

Tomorrow is my presentation and I want to clear my concepts…

I've read that in DFA, "For each state, transition on all possible symbols (alphabet) should be defined."

Is for each state, defining transition on all possible symbols mandatory in DFA? If its not, then please give any examples?

Solution

Suppose a DFA was allowed to have missing transitions. What happens if you encounter a symbol which has no transtion defined for it? The result is undefined. That would seem to violate the "deterministic" characteristic of a DFA.

However, it's trivial to transform such an incomplete DFA into a complete DFA. Simply add a new state, illegal, and map any undefined transitions to the illegal state. Finally, add transitions for every symbol from the illegal state back to itself. This illegal state is often called a sink state, because once data falls into the sink there's no way to get out.

So, from a practical perspective, it's kind of moot, as long as you have a well-defined way to handle missing transitions.

Context

StackExchange Computer Science Q#66368, answer score: 24

Revisions (0)

No revisions yet.