Saturday, November 16, 2013

Finite State Machine

Def :- A Finite State Machine is a mathematical model of computation, as an abstract machine having a finite number of states ( forming set ) and transition between them. Also -

1. There is an finite sequence of symbols from a finite alphabet ( Σ = set of symbols ), 
2. One reading head is reading the string in left to right direction. 
3. There is a machine control which reside in only one state at a time. With the change of the time, a new symbol will be fetched from the string, reading head will go right and control moves from current state to next state according to transition function ( δ: Q×Σ → Q ).

Thus a FSM is typically a 3-touple (Q,Σ,δ) but if we inscribe a start state  q, where machine control will initially reside, [ which makes things more convenient ]  then it become a 4-touple (Q,Σ,δ,q0).

A FSM could be enhanced with adding a few more components. Suppose we add  a finite tape with input symbols and the machine will read one symbol at a time. Now the state transition occur according to the currently read symbol. 


 FSM and FA


Now, its a time to correct little correct ourselves. What I had told so far is obviously FSM but the definition of δ: Q×Σ → Q bound it in only a Deterministic zone. There is also a Non-deterministic FSM where  δ: Q×Σ → 2Q. That is here the next state for a current state w.r.t a read symbol is not deterministic i.e. a not single state rather a state  randomly chosen from a set of states. 

While adding some more component we can construct some beautiful construct out of this. Let's color some state with a similar color / use flag for them and name them as Accepting State. With respect to a finite string if machine control halt in a Accepting state then we will say that the machine accepted that string. Now the set of acceptable string form a Language which would be accepted by that FSM

This above mention structure is called Finite Automaton.    



No comments:

Post a Comment