Friday, 17 June 2011

Deterministic finite automata


Deterministic finite automata:
A Deterministic finite automata can be represented by a 5-tuple M = (Q, ∑, δ, q0, F) where
i.                   Q is a finite nonempty set of states
ii.                 ∑ is a finite nonempty set of input symbols
iii.              δ is a function mapping from Q x ∑  à Q  and is usually called a direct transition function. This is the unction which describes the change of states during the transition. This mapping is usually represented by a transition table or a transition diagram.
iv.              q0 Є Q is the initial state.
v.                 F C Q is the set of final states. It is assumed here that there may be more than one final state.
Example:
Let M be the deterministic finite automaton (Q, ∑, δ, q0, F),
where     Q={q0,q1}
∑= {0,1}
δ= q0
F={ q0} and δ  function table below

States
Input symbols
            
0
1
q0
q0
q1
 q1
q1
q0

It is easy to see that L(M) is the set of all strings in {0,1}* that have an even number of  1’s. For M passes from state q0 to q1with 01 is read, but M essentially ignores 0’s always remaining in its current state when an 0 is read. Thus M counts 1’s module 2, and since q0 is also the sole final state, M accepts a string if and only if the number of 1’s is even.
If M is given the input 0110,its initial configuration is (q0,00110). Then


(q0, 00110) |- M (q0, 0110)
                   |- M (q0, 110)
                   |- M (q1,10)
                   |- M(q0,0)
                   |- M(q0,Є)
There fore (q0, 0110) |-* M (q0, Є) and so 00110 is accepted by M.

 Transition Diagram:

 





 




         

1 comment: