Finite Automata

A finite state machine (FSM) or finite state automaton (plural: automata) or simply a state machine, is a model of behavior composed of a finite number of states, transitions between those states, and actions. A finite state machine is an abstract model of a machine with a primitive internal memory.

A current state is determined by past states of the system. As such, it can be said to record information about the past, i.e., it reflects the input changes from the system start to the present moment. A transition indicates a state change and is described by a condition that would need to be fulfilled to enable the transition. An action is a description of an activity that is to be performed at a given moment.

There are several action types:

Entry action

which is performed when entering the state

Exit action

which is performed when exiting the state

Input action

which is performed depending on present state and input conditions

Transition action

which is performed when performing a certain transition

There are two types of Finite Automata, both describe what are called regular languages

Deterministic Finite Automata (DFA) – There is a fixed number of states and we can only be in one state at a time

Non Deterministic Finite Automata (NFA) –There is a fixed number of states but we can be in multiple states at one time

-- NFA to DFA

While NFA’s are more expressive than DFA’s, we will see that adding nondeterminism does not let us define any language that cannot be defined by a DFA.