Deterministic Finite Automata
Deterministic Finite Automata
Course: FIRST
Stage: 2
2
Deterministic Finite Automaton
(DFA)
3
Strings or input strings are sequence of symbols chosen from alphabet
Σ. For example abb is a string of alphabet Σ={a,b}, also it can be
Σ={a,b,c} but it just happens not to have any c’s. Σ* stands for the set of
all string over the alphabet Σ and the special string called empty string
represented by epsilon. The language of a DFA is a subset of Σ* for
some alphabet Σ. With other words the language that DFA defines is the
set of strings that may take the start state to a final state. Languages that
have an equivalent deterministic finite automaton are called regular
languages, which also can be described by regular expressions or non-
deterministic finite automata. While most of the languages are regular
languages, there are also many of them that are not. To describe these
kind of languages we need more powerful mechanism such as
contextfree grammar (this is not relevant with this project). The
transition function describes how the automaton moves from one state to
another in response to inputs. We can say that this function is the one
that makes the automaton works. It takes two arguments, a state q and
an input symbol a, and it returns the states where the automaton moves
when it is in the state q and next input symbol a. For example in the
Figure 1 from state 15:15 on input symbol A automaton make a
transition to state 30:15. This function has a value for each state and
symbol, but what happens when we reach a state that does not have
any out transition (ex: state A and B in the tennis score game)? To fix
up the situations where we do not want to continue in such situations we
introduce the dead state synonymously trap state, which is a non-
accepted state and it has transitions to itself on every input symbol.
4
That means that once you get to a dead state, there is no possible way to
leave it.
5
The deterministic finite automaton is the only way so far to execute an
automaton, that means that only a DFA can be implemented. No one yet
has invented a computer that works with
nondeterminism.
States:
OPEN
CLOSED
Sensor:
FRONT: someone on rear pad
REAR: someone on rear pad
BOTH: someone on both pads
NEITHER no one on either pad.
6
<source>
4- Bakhadyr Khoussainov
Computer Science Department, The University of Auckland, New
Zealand .. [email protected]