FACTOID # 93: Saudi diplomats have 367 unpaid parking fines in Britain.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Deterministic finite automaton

In the theory of computation, a deterministic finite state machine or deterministic finite automaton (DFA) is a finite state machine where for each pair of state and input symbol there is a deterministic next state.


Formal definition

A DFA is a 5-tuple, (S, Σ, T, s, A), consisting of

  • a finite set of states (S)
  • a finite set called the alphabet (Σ)
  • a transition function (T : S × Σ → S).
  • a start state (sS)
  • a set of accept states (AS)

Let M be a DFA such that M = (S, Σ, T, s, A), and X = x1x2 ... xn be a string over the alphabet Σ. M accepts the string X if a sequence of states, r0,r1, ..., rn, exists in S with the following conditions:

  1. r0 = s
  2. ri+1 = T(ri, xi), for i = 0, ..., n-1
  3. rnA.

As shown in the first condition, the machine starts in the start state s. The second condition says that given each character of string X, the machine will transition from state to state as ruled by the transition function T. The last condition says that the machine accepts if the last input of X causes the machine to be in one of the accepting states. Otherwise, it is said to reject the string. The set of strings it accepts form a language, which is the language the DFA recognises.


Example

The following example is of a DFA M, with a binary alphabet, which determines if the input contains an even number of 0s.


M = (S, Σ, T, s, A) where

0
1
S1 S2 S1
S2 S1 S2


The state diagram for M is:

Image:DFAexample.png

Simply put, the state S1 represents that there has been an even number of 0s in the input so far, while S2 signifies an odd number. A 1 in the input does not change the state of the automaton. When the input ends, the state will show whether the input contained an even number of 0s or not.


The language of M can be described by the regular language given by this regular expression:


  Results from FactBites:
 
PlanetMath: deterministic finite automaton (502 words)
Although the operation of a DFA is much easier to compute than that of a non-deterministic automaton, it is non-trivial to directly generate a DFA from a regular grammar.
It is much easier to generate a non-deterministic finite automaton from the regular grammar, and then transform the non-deterministic finite automaton into a DFA.
This is version 6 of deterministic finite automaton, born on 2002-02-24, modified 2007-09-28.
Finite state machine (830 words)
A finite state machine (FSM) or finite state automaton (FSA) is an abstract machine used in the study of computation and languages that has only a finite, constant amount of memory (the state).
Finite automata may operate on languages of finite words (the standard case), infinite words (Rabin automata, Büchi automata[?]), or various types of trees (tree automata), to name the most important cases.
Apart from theory, finite state machines occur also in hardware circuits, where the input, the state and the output are bit vectors of fixed size (Moore and Mealy machines).
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m