Professional Documents
Culture Documents
Dfa &nfa
Dfa &nfa
Introduction:
DFA means deterministic finite auto meta .
The machine consists of a sequence of states which
is
denoted by circles , the connections between
each states are represented using edges.
The machine has single transition for a particular
input from the current state is called DFA.
Q=Set of states
=Set of input alphabets
=Transition function
q0 =initial state of the machine
A =Final state or accepting state
a.
b.
c.
d.
String matching
Compiler construction
Lexical analysis
Syntax analysis
Code optimization
Code generation
String matching:
String = H A I
H
Q0
A
Q1
I
Q2
Here,
Q3
Transition diagram:
=Inputs (0,1)
Q=Set of statements(a ,b ,c , d)
A=Final state(d)
a
b
c
d
0
b
b
d
d
1
a
c
a
d
where M=(Q, , , q0 , A)
Inputs=0,1
Total States=5