Lecture 3 (Finite State Automata), 1/30/06
Concepts, definitions (in italics):
- Equivalent regular expressions
- Regular languages
- finite state automata (FSAs) - states, input characters, transitions
- 3 representations for FSAs (diagram, table, sets)
- a computation of an FSA - sequence of 0 or more transitions
- a valid computation of an FSA
- an accepting computation of an FSA
- a string w accepted by an FSA A - if there exists an accepting computation of A on w
- the language recognized (accepted) by an FSA (= set of strings accepted by FSA)
Reading:
- sec. 1.1 through fig. 1.22
Skills:
- Know new definitions, understand new concepts
- Write a formal (set-based) FSA description from an FSA diagram or table
- Construct a diagram/table given a formal FSA description
- Determine whether a given string is accepted by a given FSA
- What is a computation of length 0? What does it accept?
- Determine the language recognized by a given FSA
Notes:
- Definition 1.7 is an alternate definition of a regular language;
we will prove that the two definitions are equivalent.
- For any regular language, there may be multiple
regular expressions that specify it; simpler ones are preferable.
- The formal description of an FSA is a quintuple (Q,
S, d, q0, F)
- Note: the
book's definition of d is different from the
one I provided; theirs is a mapping from the pair (state, symbol) to new state,
rather than a set of triples (state, symbol, new state).
- a computation of an FSA A on input string w
is a sequence of transitions in A; it is valid if:
- 1st transition starts at initial state
- each next transition starts where previous one ended
- the labels along this sequence of transitions "spell out"
w
- A valid computation is accepting if
- last transition ends at final state
-
Example of proof. (Notation: bold font indicates regular expressions, italics
indicate strings.)
To prove: abcdad Î (a(bc)*d)*.
Proof:
- Let w1
= a; w1
Î a (from rule 1 of
definition 1.26)
- Let w2
= b; w2
Î b (from rule 1 of
definition 1.26)
- Let w3
= c; w3
Î c
(from rule 1 of definition 1.26)
- Let w4
= w2w3
= bc; w4
Î cd
(from steps 2 and 3, from definition 1.26, and from
definition of concatenation)
- w4
Î (bc)*
(from step 4, from definition 1.26, and from definition
of star)
- Let w5
= w1w4
= abc; w5
Î a(bc)* (from steps
1 and 5, from definition 1.26, and from definition of concatenation)
- Let w6
= d; w6
Î d
(from rule 1 of definition 1.26)
- Let w7
= w5w6
= abcd; w7
Î a(bc)*d (from
steps 6 and 7, from definition 1.26, and from definition of concatenation)
- Let w8
= e; w8
Î (bc)*
(from definition 1.26, and from definition of star)
- Let w9
= w1w8
= a; w9
Î a(bc)* (from steps
1 and 9, and from definition of concatenation)
- Let w10
= w9w6
= ad; w10
Î a(bc)*d (from
steps 10 and 7, and from definition of concatenation)
- Let w11
= w7w10
= abcdad; w11
Î (a(bc)*d)* (from
steps 8 and 11, and from definition of star)
QED