States
Start State
Final States
Input
Transitions
A finite automaton that recognizes strings from the set {0,1} with one or more 0's followed by one or more 1's.
A finite automaton that recognizes strings from the set {0,1} that end with the last to characters being '00'.
A Finite Automaton that recognizes strings from the set { a, b, c} consisting of all strings with no 'a' to the right of any 'c'.
Man, Wolf, Goat, Cabbage problem.
States?
Input?
How many states?
A Finite State Automaton is a 5-tuple:
1. A finite set Q, called states
2. A finite set S, called the alphabet
3. δ: Q x S -> Q is the transition function
4. q0 in Q is the start state
5. F subset of Q, the set of accepting or final states
There are several ways to formalize the notion that a string is accepted by a finite state automaton.
Page 40 defines one way.
An equivalent way is to extend the transition function to a new function δ': Q x A* -> Q, where A is the alphabet.
The meaning of this extended function δ'(q, w) is the state that the finite state automaton would be in starting from state q and reading all the input characters in the string w.
A string w would be accepted by the finite state automaton if δ'(q0, w) is a final or accepting state.
The language of a finite state automaton is the set of all strings that are accepted by the finite state automaton.
A language is recognized by a finite state automaton if it is equal to the language of the finite state automaton.
A formal language is a set of strings over some alphabet of symbols.
A formal language is regular if it is recognized by some finite state automaton.
Three operations are defined on formal languages.
Union: A ∪ B
Concatenation: A o B
Star: A*
We may assume that Languages are over the same alphabet.
The collection of Regular Languages is closed under strings that are accepted by the finite state automatonthe three operations: union, concatenation, and star.
A: Strings in {0,1} that contain '111'
B: Strings in {0,1} that end with '00'
A nondeterministic finite automaton (NFA) has a different transition function.
δ: Q x Aε -> P(Q)
P(Q) is the power set of Q
Aε is the alphabet with the empty string added.
Design an NFA that recognizes those strings that begin with 0 or more letters in {a,b} and followed by 0 or more letters in {b,c}.
Convert the previous NFA to an equivalent DFA.
The idea is to create a new DFA whose states will correspond to subsets of the NFA states.
For each state or set of states in the NFA, we will need to consider the set of all states that can be reached without reading any additional input. This is the closure of the state or set of states.
The start state of the DFA will be the closure of the start state of the NFA.
The transition function on the DFA will be defined on subsets of the original states of the NFA. We use the NFA transition function on each state in the set, but we also take the closure to get a target set of states. This set is the new DFA state.