Beta Phase: Square45 is currently in beta testing. Expect some features or content to be incomplete or missing.
45

Automata Theory

The study of automata theory.

Sequence of Expressions

Automaton An automaton can be represented formally by a quintuple M=Σ,Γ,Q,δ,λM=\langle \Sigma ,\Gamma ,Q,\delta ,\lambda \rangle , where: - Σ\Sigma is a finite set of symbols, called the input alphabet of the automaton, - Γ\Gamma is another finite set of symbols, called the output alphabet of the automaton, - QQ is a set of states, - δ\delta is the next-state function or transition function δ:Q×ΣQ\delta :Q\times \Sigma \to Q mapping state-input pairs to successor states, - λ\lambda is the next-output function λ:Q×ΣΓ\lambda :Q\times \Sigma \to \Gamma mapping state-input pairs to outputs. If QQ is finite, then MM is a finite automaton. Input word An automaton reads a finite string of symbols a1a2...ana_{1}a_{2}...a_{n} , where aiΣa_{i}\in \Sigma , which is called an input word. The set of all words is denoted by Σ\Sigma ^{*} . Run A sequence of states q0,q1,...,qnq_{0},q_{1},...,q_{n} , where qiQq_{i}\in Q such that qi=δ(qi1,ai)q_{i}=\delta (q_{i-1},a_{i}) for 0<in0<i\leq n , is a run of the automaton on an input a1a2...anΣa_{1}a_{2}...a_{n}\in \Sigma ^{*} starting from state q0q_{0} . In other words, at first the automaton is at the start state q0q_{0} , and receives input a1a_{1} . For a1a_{1} and every following aia_{i} in the input string, the automaton picks the next state qiq_{i} according to the transition function δ(qi1,ai)\delta (q_{i-1},a_{i}) , until the last symbol ana_{n} has been read, leaving the machine in the final state of the run, qnq_{n} . Similarly, at each step, the automaton emits an output symbol according to the output function λ(qi1,ai)\lambda (q_{i-1},a_{i}) . The transition function δ\delta is extended inductively into δ:Q×ΣQ{\overline {\delta }}:Q\times \Sigma ^{*}\to Q to describe the machine's behavior when fed whole input words. For the empty string ε\varepsilon , δ(q,ε)=q{\overline {\delta }}(q,\varepsilon )=q for all states qq , and for strings wawa where aa is the last symbol and ww is the (possibly empty) rest of the string, δ(q,wa)=δ(δ(q,w),a){\overline {\delta }}(q,wa)=\delta ({\overline {\delta }}(q,w),a) . The output function λ\lambda may be extended similarly into λ(q,w){\overline {\lambda }}(q,w) , which gives the complete output of the machine when run on word ww from state qq .Acceptor In order to study an automaton with the theory of formal languages, an automaton may be considered as an acceptor, replacing the output alphabet and function Γ\Gamma and λ\lambda with - q0Qq_{0}\in Q , a designated start state, and - FF , a set of states of QQ (i.e. FQF\subseteq Q ) called accept states. This allows the following to be defined: Accepting word A word w=a1a2...anΣw=a_{1}a_{2}...a_{n}\in \Sigma ^{*} is an accepting word for the automaton if δ(q0,w)F{\overline {\delta }}(q_{0},w)\in F , that is, if after consuming the whole string ww the machine is in an accept state. Recognized language The language LΣL\subseteq \Sigma ^{*} recognized by an automaton is the set of all the words that are accepted by the automaton, L={wΣ  δ(q0,w)F}L=\{w\in \Sigma ^{*}\ |\ {\overline {\delta }}(q_{0},w)\in F\} . Recognizable languages The recognizable languages are the set of languages that are recognized by some automaton. For finite automata the recognizable languages are regular languages. For different types of automata, the recognizable languages are different. - ^Cite error: The named reference Arbib 1969 was invoked but never defined (see the help page). - ^Cite error: The named reference structure theory was invoked but never defined (see the help page). - ^Moore, Cristopher (2019-07-31). "Automata, languages, and grammars". arXiv:1907.12713 [cs.CC].
Automata are defined to study useful machines under mathematical formalism. So the definition of an automaton is open to variations according to the "real world machine" that we want to model using the automaton. People have studied many variations of automata. The following are some popular variations in the definition of different components of automata. Input - Finite input: An automaton that accepts only finite sequences of symbols. The above introductory definition only encompasses finite words. - Infinite input: An automaton that accepts infinite words (ω-words). Such automata are called ω-automata. - Tree input: The input may be a tree of symbols instead of sequence of symbols. In this case after reading each symbol, the automaton reads all the successor symbols in the input tree. It is said that the automaton makes one copy of itself for each successor and each such copy starts running on one of the successor symbols from the state according to the transition relation of the automaton. Such an automaton is called a tree automaton. - Infinite tree input : The two extensions above can be combined, so the automaton reads a tree structure with (in)finite branches. Such an automaton is called an infinite tree automaton. States - Single state: An automaton with one state, also called a combinational circuit, performs a transformation which may implement combinational logic. - Finite states: An automaton that contains only a finite number of states. - Infinite states: An automaton that may not have a finite number of states, or even a countable number of states. Different kinds of abstract memory may be used to give such machines finite descriptions. - Stack memory: An automaton may also contain some extra memory in the form of a stack in which symbols can be pushed and popped. This kind of automaton is called a pushdown automaton. - Queue memory: An automaton may have memory in the form of a queue. Such a machine is called queue machine and is Turing-complete. - Tape memory: The inputs and outputs of automata are often described as input and output tapes. Some machines have additional working tapes, including the Turing machine, linear bounded automaton, and log-space transducer. Transition function - Deterministic: For a given current state and an input symbol, if an automaton can only jump to one and only one state then it is a deterministic automaton. - Nondeterministic: An automaton that, after reading an input symbol, may jump into any of a number of states, as licensed by its transition relation. The term transition function is replaced by transition relation: The automaton non-deterministically decides to jump into one of the allowed choices. Such automata are called nondeterministic automata. - Alternation: This idea is quite similar to tree automata but orthogonal. The automaton may run its multiple copies on the same next read symbol. Such automata are called alternating automata. The acceptance condition must be satisfied on all runs of such copies to accept the input. - Two-wayness: Automata may read their input from left to right, or they may be allowed to move back-and-forth on the input, in a way similar to a Turing machine. Automata which can move back-and-forth on the input are called two-way finite automata. Acceptance condition - Acceptance of finite words: Same as described in the informal definition above. - Acceptance of infinite words: an ω-automaton cannot have final states, as infinite words never terminate. Rather, acceptance of the word is decided by looking at the infinite sequence of visited states during the run. - Probabilistic acceptance: An automaton need not strictly accept or reject an input. It may accept the input with some probability between zero and one. For example, quantum finite automata, geometric automata and metric automata have probabilistic acceptance. Different combinations of the above variations produce many classes of automata. Automata theory is a subject matter that studies properties of various types of automata. For example, the following questions are studied about a given type of automata. - Which class of formal languages is recognizable by some type of automata? (Recognizable languages) - Are certain automata closed under union, intersection, or complementation of formal languages? (Closure properties) - How expressive is a type of automata in terms of recognizing a class of formal languages? And, their relative expressive power? (Language hierarchy) Automata theory also studies the existence or nonexistence of any effective algorithms to solve problems similar to the following list: - Does an automaton accept at least one input word? (Emptiness checking) - Is it possible to transform a given non-deterministic automaton into a deterministic automaton without changing the language recognized? (Determinization) - For a given formal language, what is the smallest automaton that recognizes it? (Minimization) - ^Cite error: The named reference structure theory was invoked but never defined (see the help page).
Let Σ\Sigma be a finite alphabet. A Deterministic Finite Automaton (DFA) is a 5-tuple M=Q,Σ,δ,q0,FM = \langle Q, \Sigma, \delta, q_0, F \rangle, where:\\ \n1. QQ is a finite set of states.\\ 2. Σ\Sigma is the input alphabet.\\ 3. δ:Q×ΣQ\delta: Q \times \Sigma \to Q is the transition function.\\ 4. q0Qq_0 \in Q is the initial state.\\ 5. FQF \subseteq Q is the set of accepting (final) states.\\ \nFor any input string w=w1w2wnΣw = w_1 w_2 \dots w_n \in \Sigma^*, the extended transition function δ:Q×ΣQ\delta^*: Q \times \Sigma^* \to Q is defined recursively:\\ \nδ(q,w1w2wn)=δ((δ(q,w1w2wn1)),wn)\delta^*(q, w_1 w_2 \dots w_n) = \delta^*((\delta^*(q, w_1 w_2 \dots w_{n-1})), w_n) \\nwith the base case δ(q,ϵ)=q\delta^*(q, \epsilon) = q. \\nThe language recognized by MM, denoted L(M)L(M), is the set of all strings ww that lead the automaton from the initial state q0q_0 to an accepting state fFf \in F: \\nL(M)={wΣδ(q0,w)F}L(M) = \{ w \in \Sigma^* \mid \delta^*(q_0, w) \in F \} \\nAutomata Theory studies the relationship between the class of formal languages (e.g., regular languages, context-free languages) and the minimal computational models (automata) required to recognize them, formalized by theorems such as the Pumping Lemma and the Chomsky Hierarchy.