What is meant by the term 'state' in a finite-state machine?
I have not seen a proper definition on the web and am looking for a university-level answer.
Thank you in advance.
What is meant by the term 'state' in a finite-state machine?
I have not seen a proper definition on the web and am looking for a university-level answer.
Thank you in advance.
A state is simply an assignment of all possible variables of a system to values. A state transition then means a transition from one possible set of values of variables to another set of values.
To see how this might be useful, imagine a set of two switches $S$ and a light bulb $B$ that are connected to emulate some unknown logical gate. If you want to find out what that gate is, you can use a state machine model:
Say $I = \{S,B\} $
Initial State: $I = \{\{0,0\},0\}$
State transitions:
$\{\{0,0\},0\} \rightarrow \{\{1,0\},1\} \rightarrow \{\{0,1\},1\} \rightarrow \{\{1,1\},0\} $
It is evident that every state is just a set of different possible values of $I.$
By looking at the values of $B$ for a set of values of $S$, You can easily deduce that the system emulates a XOR gate.
If you have done some programming in some language , then the current executing instruction can be considered as the state in automata,
Like if you consider this python code :
print('Hello') - (A)
print('World') - (B)
then it simply going from A->B which will be giving you the output of "Hello World"
on your console.
So you are going from one state to another on some input or terminating the automation if nothing is left to consume.