Computing - Finite State Machines

AQA Computer Science 2022


FSM diagram symbols

What does this symbol represent in FSM?

A state.

What does this symbol represent in FSM?

The start state.

What does this symbol represent in FSM?

The end or accept state.

What does this symbol represent in FSM?

A transition.

What a finite state machine is

What does the language recognised by a FSM consist of?

All string accepted by the finite state machine.

What is a finite state machine?

An abstract model of computation that is used to model logic.

What is an end or an accepting state?

A state which is reached when a valid string is entered.

What inputs do finite state machines accept?

A string.

In relation to FSM, what are strings made out of?

Symbols from a defined alphabet.

Do finite state machines need an end or accepting state?

No.

Worked example: light switch

What would the two states for a FSM machine be for a light turning on and off at the push of a button?

  • Light on
  • Light off

When in the “light on” state of a FSM machine for a light turning on and off at the push of a button, what are the two transitions you can make?

  • Button pressed
  • Button not pressed

Mealy machines

What is a finite state machine with output called?

A Mealy Machine.

How are transitions labelled on a mealy machine?

\[\text{input}/\text{output}\]

What is the difference between a finite state machine and a mealy machine?

They generate an output on a state transition.

State transition tables

What are the 4 columns for a Mealy Machine’s state transition table?

  • Input
  • Current state
  • Output
  • Next state

What is a state transition table?

A table showing what happens to each input at each state.

Explain in words the above part of a state sequence table?

A $0$ is inputed while at state $S1$. This causes an output of $1$ and the machine moves to state $S0$.

Recognising substrings

What is a common use of a Mealy Machine?

To recognise substrings.

What substring does this Mealy Machine recognise?

\[10\]