6. State Transition Diagrams

Many systems have definite stages - for instance a traffic light system can be on red, red and amber, green, amber.

These are called the 'states' of the system.

To move from one state into another a 'transition event' takes place i.e. something causes the traffic light to move from one state to another. In the case of a traffic light, a straightforward timer is controlling the system. But transition events can be anything.

Another example is a door. The states of the door system are 'open' and 'closed'. The transition event could be a number of things - person turns door handle, infra-red sensor detecting approaching person, pressure mat sensing person and so on.

The last two examples are real physical systems. But systems can be abstract as well. For example a bank account.

The states of the account could be

  • 'empty',
  • 'money present',
  • 'overdrawn'
  • and unfortunately 'overdraft limit reached'.

Events occur to move between these four states. The main transition events are either 'add money' or 'withdraw money', just how much money you add or withdraw will determine in which state the system will end up.

All these systems can be represented by a 'state transition diagram'.

 

challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: State transition diagrams