Finite State Machine
Description:
Mathematical model of computation
Can be in exactly one of a finite number of states at any given time.
A finite-state automata M = ( S , I , f , s 0 , F ) :
consists of
S : a finite set of states
I : a finite input alphabet
f : a transition function
assigns a next state to every pair of state and input
such that f : S × I → S
an initial or final state, s 0
a set of possible accepting state, F
example question and my attempt solution
Types of FA
FA without output:
FA with output:
Transition:
To change FA from one state to another in response to some inputs
Accept/reject string:
A string is said to be recognized or accepted by the machine, M = ( S , I , f , s 0 , F ) , if it takes the initial state s 0 to a final state, that is f ( s 0 , x ) , is a state in F .
example:
sample state machine
(question) 𝑥=01011, what is f ( s 0 , x ) ? Is it accepted?
(answer) Yes
f ( s 0 , x ) = S0 S1 S1 S0 S1 , take from the initial to final state
(question) 𝑦=00110, what is f ( s 0 , y ) ? Is it accepted?
(answer) No
f ( s 0 , x ) = S0 S0 S1 S0 S0 , doesnt take from init to final state
Language recognition by FSM
The language recognized or accepted by the machine M , denoted by L ( M ) , is the set of all strings that are accepted by M
Determine languages recognized by a machine M:
define final state(s) of M
per each final state, determine the string that take the initial to its final state
example
Equivalent finite-state automata:
Definition: Two finite-state automata are called equivalent if they recognize the same language
Meaning accept the same set of inputs
example question & solution
State table: