Title: Deterministic Finite-State Machine (or Deterministic Finite Automaton)
1Deterministic Finite-State Machine (or
Deterministic Finite Automaton) A DFA is a
5-tuple, (S, S, T, s, A), consisting of S
a finite set of states S a finite set of
symbols called the alphabet T a transition
function (T S S ? S) s a start state (s
? S) A a set of accept states (A ? S) Let M
be a DFA such that M (S, S, T, s, A), and X
x0x1 ... xn be a string over the alphabet S. M
accepts the string X if a sequence of states,
r0,r1, ..., rn, exists in S with the following
conditions 1. r0 s 2. ri1 T(ri, xi),
for i 0, ..., n-1 3. rn ? A.
2Every Regular Expression can be Recognized by
some DFA
- Regular expressions consist of constants and
operators that denote sets of strings and
operations over these sets, respectively. - Given a finite alphabet S the following constants
are defined - (empty set) Ø
- (empty string) e
- (literal character) a in S
- The following operations are defined
- concatenation
- alternation ab
- Replication R
- Wildcard . (exactly one occurrence)
3Classical Limitation of DFA
- no DFA can recognize is bracket language, that is
language that consists of properly paired
brackets, such as (()()). - More formally the language consisting of strings
of the form anbn some finite number of a's,
followed by an equal number of b's. It can be
shown that no DFA can have enough states to
recognize such a language.