deterministic finite automaton
A deterministic finite automaton (or DFA) is a deterministic automaton with a finite input alphabet and a finite number of states. It can be formally defined as a 5-tuple , where
-
•
is a non-empty finite set of states,
-
•
is the alphabet (defining what set of input strings the automaton operates on),
-
•
is the transition function,
-
•
is the starting state, and
-
•
is a set of final (or accepting states).
A DFA works exactly like a general automaton: operation begins at , and movement from state to state is governed by the transition function . A word is accepted exactly when a final state is reached upon reading the last (rightmost) symbol of the word.
DFAs represent regular languages, and can be used to test whether any string in is in the language it represents. Consider the following regular language over the alphabet (represented by the regular expression aa*b
):
This language can be represented by the DFA with the following state diagram: