Académique Documents
Professionnel Documents
Culture Documents
CPU
Memory
logic
storage
Input signals
PUSH
ON
OFF
NO_PUSH
OFF
ON
Push
No-Push
OFF
ON
States circles
Transitions arrows
Input labels on arrows
Push
Example 2: A string recognizing machine recognizes the string THE
0
1
H
4
States
3
in-arrow
from no-where
present
present
Start
Intermediate
Final Accept
(Double circle)
Reject
present
(Single circle)
out-arrow
present
present
may be
no
Transition Function:
Present
States
OFF
ON
Input signals
PUSH
ON
OFF
NO_PUSH
OFF
ON
The transition table reveals relation between states and input symbol called as transition
function :
The function takes a state (present) and an input symbol and outputs a new state (next).
(OFF,PUSH)=ON
(OFF,NO_PUSH)=OFF
(ON,PUSH)=OFF
(ON,NO_PUSH)=ON
Let we define
Q set of states - Q={OFF, ON}
set of input symbols the alphabet: ={ PUSH, NO_PUSH }
The transition function can be written as
: Qx Q
Again defining the start state as q0 the OFF state
q0Q
Also the set of accept states
FQ
Define the finite state machine as 5 tuple
M= {Q, q0, , , F }
A set of languages is closed under an operation if the result of applying the operation to any
arbitrary language(s) of the set is a language in the set.
For example a set of languages is closed under union if the union of any two languages of the
set also belongs to the set.
Theorem 1: The set of regular languages over an alphabet is closed under operations union,
concatenation and Kleene star.
Proof: Let Lr and Ls be regular languages over an alphabet . Then by the definition of the set
of regular languages , Lr Ls , LrLs and Lr* are regular languages and they are obviously over
the alphabet . Thus the set of regular languages is closed under those operations.
0,1
q1
q2
Equivalent DFA
accepting string 0*1*10*
0,1
0
q1
{q1,q2}
q2
q2
X
q1
q1
q3
q3
q4
q4