|
|
|
Viewing Version
32
of
'automaton'
|
[ view 'automaton'
|
back to history
]
| Title of object: |
automaton |
| Canonical Name: |
Automaton |
| Type: |
Definition |
| Created on: |
2002-02-23 22:56:31 |
| Modified on: |
2009-06-09 03:57:26 |
| Classification: |
msc:68Q45, msc:03D05 |
| Defines: |
finite-state automaton, transition function, starting state, final state, configuration, acceptor, automata |
| Synonyms: |
automaton=next-state function automaton=terminating state automaton=FSA automaton=start state automaton=recognizer |
Preamble:
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts} |
Content:
An \emph{automaton} is a general term for any formal model of computation. Typically, an automaton $A$ is represented as a \emph{state machine}. Specifically, $A$ is a five-tuple $(S,\Sigma,\delta,I,F)$, consisting of
\begin{enumerate}
\item
a non-empty set $S$ of states,
\item
a non-empty set $\Sigma$ of symbols; a pair $(s,\alpha)$ of a state $s\in S$ and a symbol $\alpha \in\Sigma$ is called a \emph{configuration},
\item
a rule $\delta$ associating every configuration $(s,\alpha)$ a subset $\delta(s,\alpha)\subseteq S$ of states; $\delta$ is called a \emph{next-state relation}, or a \emph{transition relation},
\item
a non-empty set $I\subseteq S$ of \emph{starting states}, and
\item
a set $F\subseteq S$ of \emph{final states} or \emph{terminating states}.
\end{enumerate}
\textbf{Remarks}.
\begin{itemize}
\item
A triple $(s,\alpha,t)$ is called a \emph{transition} if $t\in \delta(s,\alpha)$, and is written $s\stackrel{\alpha}{\longrightarrow} t$.
\item
The set $\delta(s,\alpha)$ of next states may contain one, more than one, or no elements.
\item
If $\delta(s,\alpha)$ is a singleton for every configuration $(s,\alpha)$, then $\delta$ can be viewed as a function (called a \emph{transition function}) from the set of configurations $S\times \Sigma$ to $S$.
\item
If $\delta:S\times \Sigma \to S$ is a function, and in addition $I$ is a singleton, then the automaton $A$ is said to be \emph{deterministic}. Otherwise, $A$ is \emph{non-deterministic}.
\item
If $S$ and $\Sigma$ are both finite, then $A$ is called a \emph{finite-state automaton}, or \emph{FSA} for short.
\end{itemize}
Basically, an automaton $A$ works as follows:
when a symbol $\alpha$ is fed into $A$ with starting state $q$, a set $\delta(q,\alpha)$ of next states is reached. If one of the next states is a final state, then $a$ is said to be \emph{accepted} by $A$. More generally, $A$ can read strings of symbols, and the way for $A$ reads a string $a=\alpha_1\alpha_2\cdots \alpha_n$ of symbols works as follows:
\begin{quote}
when $a$ is fed into $A$ with starting state $q$, $A$ reads the leftmost symbol $\alpha_1$ first and it reaches the set of next states $\delta(q,\alpha_1)$. Take any of the possible next states, say, $s\in \delta(q,\alpha_1)$, $A$ reads the next symbol $\alpha_2$, and reaches the set of next states $\delta(s,\alpha_2)$, and so on..., until the last symbol $\alpha_n$ has been read.
\end{quote}
More formally, the set-valued function $\delta$ defined on $S\times \Sigma$ can be extended to a function $\delta^*$ defined on $P(S)\times \Sigma^*$, where $P(S)$ is the powerset of $S$ and $\Sigma^*$ is the Kleene star of $\Sigma$, as follows: for $a\in \Sigma^*$,
\begin{itemize}
\item $\delta^*(\varnothing,a):=\varnothing$
\item for any non-empty subset $Q\subseteq S$, $$\delta^*(Q,a):=\bigcup_{s\in Q} \delta^*(\lbrace s\rbrace,a)$$
\item for a singleton $\lbrace s\rbrace$, $\delta^*$ is defined inductively:
\begin{displaymath}
\delta^*(\lbrace s\rbrace ,a):= \left\{
\begin{array}{ll}
\lbrace s\rbrace & \textrm{if $a=\lambda$, the empty word,}\\
\delta(s,a) & \textrm{if $a\in \Sigma$,}\\
\delta^*(\delta^*(\lbrace s\rbrace,b),\alpha) & \textrm{if $a=b\alpha$, where $b\in \Sigma^*$ and $\alpha\in \Sigma$.}
\end{array}
\right.
\end{displaymath}
\end{itemize}
By abuse of language, we write $\delta$ for $\delta^*$ and $\delta(s,a)$ for $\delta(\lbrace s\rbrace,a)$.
In essence, $\delta$ becomes a function from $P(S)\times \Sigma^*$ to $P(S)$. A string $a\in \Sigma^*$ is \emph{accepted} by $A$ if for some starting state $q$, $\delta(q,a)$ contains a final state. The ability to accept finite strings is the reason why an automaton is also referred to as a (string) \emph{acceptor}. The subset of $\Sigma^*$ of all string accepted by $A$ is called the \emph{language accepted by} the automaton $A$, and is denoted by $$L(A).$$
Clearly, if $F=\varnothing$, then $L(A)=\varnothing$. Also, if $I\cap F\ne \varnothing$, then $\lambda \in L(A)$.
%A state transition usually has some rules associated with it that govern when the transition may occur, and are able to remove symbols from the input string. An automaton may even have some sort of data structure associated with it, besides the input string, with which it may interact.
A famous automaton is the \PMlinkname{Turing machine}{TuringMachine2}, invented by Alan Turing in 1935.
It consists of a (usually infinitely long) tape, capable of holding symbols from some alphabet, and a pointer to the current location in the tape. There is also a finite set of states, and transitions between these states, that govern how the tape pointer is moved and how the tape is modified. Each state transition is labelled by a symbol in the tape's alphabet, and also has associated with it a replacement symbol and a direction to move the tape pointer (either left or right).
At each iteration, the machine reads the current symbol from the tape. If a transition can be found leading from the current state that is labelled by the current symbol, it is ``executed.'' Execution of the transition consists of writing the transition's replacement symbol to the tape, moving the tape pointer in the direction specified, and making the state pointed to by the transition the new current state.
%There are many variations of this model that are all called Turing machines, but fundamentally they all model the same set of possible computations. This abstract construct is very useful in computability theory.
Other automata prove useful in the area of formal languages. Any context-free language may be represented by a pushdown automaton, and any regular language can be represented by a deterministic or non-deterministic finite automaton. |
|
|
|
|
|