A theoretical model for programs using a constant amount of memory regardless of the input form.
Finite control device
Finite control device: in any moment, it can be in one of its states, it is hard-wired in how it changes from one state to another. There are also some special states, such as one initial state and possible more favourable states.
Has a reading head.
It reads from an input tape: divided into cells, having a leftmost cell, each cell contains one character of the input alphabet and is fed into the machine.
The control device is hard-wired such that the next state depends on:
the previous state
the character read from the tape
As the input is finite, at some moment the reading head reaches the end of the input word (the first blank cell). If at this moment the control device is in a favourable state, then the input word is accepted by the automaton. Otherwise, the input word is not accepted, rejected.
Used for
Each finite automaton is a kind of ‘recognition’ or ‘decision’ device over all possible words of its input alphabet.
Each automaton can be ‘tried’ on infinitely many input words, and gives a Y/N answer each time.
We can represent the hard-wired control device of a finite automaton by a directed multigraph:
with the vertices representing the states
arrow-edges being labelled by symbols of the input alphabet
the initial state is marked by >
the favourable states are double-circled
each arrow represents a possible transition, hard-wired in the control device:
an arrow from state q to state r labelled by symbol a indicates that, when the head is reading a and the control device is in state q then it should move next to state r
Deterministic means that for each state and symbol, there is a unique arrow coming out of the state labelled by the symbol.
As it is unique, there is one, but not more than one. We can say that, the pair (current state,symbol read)uniquely determines the next state.
This is why DFAs are called deterministic.
DFAs will never “get stuck”, it never has to choose.
Transition Table
From A1 above, we find that:
States: s,q,r
Input alphabet: {a,b}
Initial state: s
Favourable states: q
The transition table is another way of representing the transition function of A1:
a
b
s
s
q
q
r
q
r
r
r
For each cell in the table, there is a unique state to put in.
As before, the pair uniquely indetifies the next state.
A DFA may accept certain words, while may reject others.
If we collect all words accepted by a DFA A, we obtain a language: the language of a DFA A is:
?
L(A)=set of all words over its input alphabet that A acceptsLink to original