|400 %%🖋 Edit in Excalidraw, and the dark exported image%%

A more formal way of defining determinism is that the DFA only has one possible move at every ‘step’.

Definition

Deterministic Finite Automata (DFA) ^definition-dfa

A DFA is defined as a 5-tuple:

  • An input alphabet,
  • A set of states,
  • An initial state,
  • A state transition function, which takes the current state () and the next character of the input string , and returns another state :
  • A set of accept states,

Behaviour

  • A DFA always halts, or finishes processing, for any given input finite-length input string.
  • If a DFA gets a character and doesn’t know what to do, it halts and rejects the character (as a ‘catch-all’)

Connection To Regular Languages

Recall the definition of a regular language:

Definition

Another way to interpret this is that, given a DFA , there are set of strings (a regular language) that accepts.

For example, take the DFA below:

%%🖋 Edit in Excalidraw, and the dark exported image%%

The DFA only accepts strings that contain any number of zeros. This is because it does contain transitions that require other inputs, so if it received a 1, it would not know what to do, and by default, rejects the string/word. That is:

where is the Kleene star operation applied on

The corresponding regular language is hence .

Minimal DFAs

Minimal DFA

See Minimal DFA

Examples

1: State diagram of a simple DFA

Find the formal definition () for the state diagram for the DFA below. Also include the set of accepted strings

2: Another DFA state diagram

Find the formal definition () for the state diagram for the DFA below. Also include the set of accepted strings %%🖋 Edit in Excalidraw, and the dark exported image%%