language-icon Old Web
English
Sign In

Deterministic finite automaton

In the theory of computation, a branch of theoretical computer science, a deterministic finite automaton (DFA)—also known as deterministic finite acceptor (DFA), deterministic finite state machine (DFSM), or deterministic finite state automaton (DFSA)—is a finite-state machine that accepts or rejects strings of symbols and only produces a unique computation (or run) of the automaton for each input string. Deterministic refers to the uniqueness of the computation. In search of the simplest models to capture finite-state machines, Warren McCulloch and Walter Pitts were among the first researchers to introduce a concept similar to finite automata in 1943. The figure illustrates a deterministic finite automaton using a state diagram. In this example automaton, there are three states: S0, S1, and S2 (denoted graphically by circles). The automaton takes a finite sequence of 0s and 1s as input. For each state, there is a transition arrow leading out to a next state for both 0 and 1. Upon reading a symbol, a DFA jumps deterministically from one state to another by following the transition arrow. For example, if the automaton is currently in state S0 and the current input symbol is 1, then it deterministically jumps to state S1. A DFA has a start state (denoted graphically by an arrow coming in from nowhere) where computations begin, and a set of accept states (denoted graphically by a double circle) which help define when a computation is successful. A DFA is defined as an abstract mathematical concept, but is often implemented in hardware and software for solving various specific problems. For example, a DFA can model software that decides whether or not online user input such as email addresses are valid. DFAs recognize exactly the set of regular languages, which are, among other things, useful for doing lexical analysis and pattern matching. DFAs can be built from nondeterministic finite automata (NFAs) using the powerset construction method. A deterministic finite automaton M {displaystyle M} is a 5-tuple, ( Q , Σ , δ , q 0 , F ) {displaystyle (Q,Sigma ,delta ,q_{0},F)} , consisting of Let w = a 1 a 2 . . . a n {displaystyle w=a_{1}a_{2}...a_{n}} be a string over the alphabet Σ {displaystyle Sigma } . The automaton M {displaystyle M} accepts the string w {displaystyle w} if a sequence of states, r 0 , r 1 , . . . , r n {displaystyle r_{0},r_{1},...,r_{n}} , exists in Q {displaystyle Q} with the following conditions: In words, the first condition says that the machine starts in the start state q 0 {displaystyle q_{0}} . The second condition says that given each character of string w {displaystyle w} , the machine will transition from state to state according to the transition function δ {displaystyle delta } . The last condition says that the machine accepts w {displaystyle w} if the last input of w {displaystyle w} causes the machine to halt in one of the accepting states. Otherwise, it is said that the automaton rejects the string. The set of strings that M {displaystyle M} accepts is the language recognized by M {displaystyle M} and this language is denoted by L ( M ) {displaystyle L(M)} . A deterministic finite automaton without accept states and without a starting state is known as a transition system or semiautomaton.

[ "Automaton", "Finite-state machine", "Two-way deterministic finite automaton" ]
Parent Topic
Child Topic
    No Parent Topic