Finite State Machine

Finite State Machine or Finite State Automata is a mathematical model of computation in which the machine can be in one of a finite number of states at any point in time.

An example of this may be a vending machine