Paul Nicholls Stuff

11Dec/080

Deterministic Finite-State Automaton

Deterministic Finite-State Automaton (DFA) are a method of modelling computation, and are used in conjunction with regular languages. In a DFA from each pair of input symbol and state there is only one transition to a next state (so, from any state given an input symbol the next state can be readily determined).

As an input a DFA will expect a string of symbols, each input symbol will cause a transition to a next state, until there are no more input symbols. At this point the DFA will either be on an accept state, or a non accept state - and will return "accept" or "non accept" accordingley.

It follows that the DFA M recognises the language L if L = \{ w | M \mbox{ accepts } w \}, and where any DFA accepts the langauge L, L must be a regular lanaguage.

The diagram above shows an example of a DFA, in this case the machine accepts any words ending in a '1'.

The formal definition of a DFA, M, is M = (Q, \Sigma, \delta, q_0, F ) such that

  • Q is a finite set of states (in the example Q = \{ q_1, q_2 \} )
  • \Sigma is a finite alphabet (in the example \Sigma = \{ 0, 1 \} )
  •  \delta : Q \times \Sigma \rightarrow Q is the transition function (a table showing the continuation paths from any given state)
  • q_0 is the start state, where q_0 \in Q ( q_1 in the example )
  • F \subseteq Q is the set of accept states ( F = \{ q_2 \} in the example )

DFAs can be constructed for numerous problems, and there is no fixed method for constructing one.

Minimisation of a DFA

Minimising a DFA can help reduce the overall number of states in the DFA but maintain the same pattern of input. The algorithm for reducing a DFA to its minimal form is generally:

  1. Remove all the states that are not reachable from the start state.
  2. Contract a set of states that are equivalent into a single state. (Two states are equivalent if there is no word that is accepted when starting from one of the states, but rejected when starting from the other). Formally two states s and t are equivalent if:

\lbrace w \in \Sigma^* \vert \hat{\delta}\left(s, w\right) \in F \rbrace =\lbrace w \in \Sigma^* \vert \hat{\delta} \left( t, w \right) \in F \rbrace

One model for minimising a DFA is the Team Splitting Algorithm which will always find the minimal DFA equivalent to the original.

Tagged as: , Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.