(Maybe off topic) Can someone explain what a finite state machine is?

Michael Brown Michael at invalid.invalid
Tue Jul 19 14:38:00 EDT 2011


On 2011-07-19, Matty Sarro wrote:

> Hey everyone. I am currently reading through an RFC, and it mentions
> that a client and server half of a transaction are embodied by finite
> state machines. I am reading through the wikipedia article for finite
> state machines, and sadly it's going a bit above my head. I don't
> really have a background in engineering, and would really love to
> understand what is being said. Does anyone have a simple way to
> explain it?

We can mathematically model a finite state machine (FSM) by a simple
system characterized by three quantities:

* state
* input
* output

and two functions:

* next_state_function(current_state, current_input)
* output_function(current_state, current_input)

The quantities' values are only defined between transitions, as we accept
that their values change non-continuously at each transition "tick". Thus,
at each transition the following pseudocode is run:

state <- next_state_function(state, input)

And at any point in time, the output satisfies the equation:

output = output_function(state, input)




More information about the Python-list mailing list