Formal Automata
E.2 Formal Automata
In this section we present definitions of two types of automata that are useful in syntactic pattern recognition and a Turing machine (because of its meaning in dis-
cussions concerning AI, cf. Chap. 17 )[ 141 , 250 ].
Definition E.9
A (deterministic) finite-state automaton is a quintuple
A T , δ, q 0 , F), where
Q is a finite nonempty set of states, T is a finite set of input symbols, T −→ Q is the state-transition function, q 0 ∈ Q is the initial state,
F ⊆ Q is a set of final states. Now, we introduce notions allowing us to describe a computation performed by
a finite-state automaton. ∗ T ,
called an automaton instantaneous configuration. The first element represents a state of the automaton, the second a part of an input string that has not been read till now. Let ⊢ denote a direct step of an execution of an automaton.
A finite-state automaton analyzes an input string β according to the following scheme. At the beginning the automaton is in a state q 0 , and an input string β is at its input, so (q 0 , β) is the initial configuration of the automaton. The automaton reads symbols of the input string one by one, and it performs succeeding steps according to the following rule.
( q i , a γ) ⊢ (q k , γ) ⇔ δ(q i , a) =q k , where δ is the state-transition function q i , q k
T ∗ . The automaton stops if it reaches a configuration (q m , λ) such that q m ∈ F (q m is
a final state) and there is an empty word λ at its input. Definition E.10
A (deterministic) pushdown automaton is a seven-tuple
δ, q 0 , Z 0 , F), where Q is a finite nonempty set of states,
T is a finite set of input symbols, is a finite set of stack symbols,
∗ is the transition function, q 0 ∈ Q is the initial state,
F ⊆ Q is a set of final states.
Appendix E: Formal Models for Artificial Intelligence Methods … 275 An instantaneous configuration of a pushdown automaton is represented with a
∗ , where the first two elements are the same as for a finite-state automaton, and the third element represents the content of the stack (the
first symbol corresponds to the topmost symbol of the stack).
A pushdown automaton analyzes an input string β according to the following scheme. (q 0 , β, Z 0 ) is the initial configuration. The automaton reads symbols of the input string one by one, and it performs succeeding steps according to the following rule.
a, Z) = (q k , η), where δ is the transition function, q i , q k
( q i , a γ, Zφ) ⊢ (q k , γ, ηφ) ⇔ δ(q i ,
∗ . There are two (various) definitions of finishing a computation in case of pushdown
automata. In the first one (an acceptance by a final state) (q m , λ, ξ), where q m ∈ F, λ the empty word, is the final configuration. In the second definition (an acceptance by an empty stack) (q m , λ, λ), where q m ∈ Q, is the final configuration.
Definition E.11
A (one-tape) Turing machine is a seven-tuple
A T , δ, q 0 , F), where Q is a finite nonempty set of states,
is a finite nonempty set of tape symbols,
q 0 ∈ Q is the initial state,
F ⊆ Q is a set of final states.
A Turing machine consists of a finite control (defined by the transition function) and an infinite tape divided into cells. An input word is placed on the tape, each symbol in one cell, and all the cells on the left and on the right of the word are marked with the blank symbol B. At the beginning a reading/writing head of the control is set over
a cell containing the first symbol of the word to be analyzed. It is represented with the initial configuration :q 0 X 1 X 2 ... X n , where q 0 is the initial state, X 1 X 2 ... X n denotes the content of the cells (the input word). In general, an instantaneous configuration of a Turing machine is of the form X 1 X 2 ... X i −1 qX i X i +1 ... X n , which means placing of the head over the i-th cell, and the machine is in state q.
A Turing machine analyzes an input word according to the following scheme.
X 1 ... X i −1 q k X i X i +1 ... X n ⊢X 1 ... X i −1 Yq m X i +1 ... X n , if δ(q k , X i ) = (q m , Y , R) (a change of a state from q k to q m a change of a symbol on
the tape from X i to Y , and moving the head to the right), and
X 1 ... X i −1 q k X i X i +1 ... X n ⊢X 1 ... X i −2 q m X i −1 YX i +1 ... X n ,
276 Appendix E: Formal Models for Artificial Intelligence Methods … if δ(q k , X i ) = (q m , Y , L) .
A Turing machine is described in a more detailed way in [ 141 ].