Automata theory explained

Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them. It is a theory in theoretical computer science with close connections to mathematical logic. The word automata comes from the Greek word αὐτόματος, which means "self-acting, self-willed, self-moving". An automaton (automata in plural) is an abstract self-propelled computing device which follows a predetermined sequence of operations automatically. An automaton with a finite number of states is called a finite automaton (FA) or finite-state machine (FSM). The figure on the right illustrates a finite-state machine, which is a well-known type of automaton. This automaton consists of states (represented in the figure by circles) and transitions (represented by arrows). As the automaton sees a symbol of input, it makes a transition (or jump) to another state, according to its transition function, which takes the previous state and current input symbol as its arguments.

Automata theory is closely related to formal language theory. In this context, automata are used as finite representations of formal languages that may be infinite. Automata are often classified by the class of formal languages they can recognize, as in the Chomsky hierarchy, which describes a nesting relationship between major classes of automata. Automata play a major role in the theory of computation, compiler construction, artificial intelligence, parsing and formal verification.

History

The theory of abstract automata was developed in the mid-20th century in connection with finite automata.[1] Automata theory was initially considered a branch of mathematical systems theory, studying the behavior of discrete-parameter systems. Early work in automata theory differed from previous work on systems by using abstract algebra to describe information systems rather than differential calculus to describe material systems.[2] The theory of the finite-state transducer was developed under different names by different research communities.[3] The earlier concept of Turing machine was also included in the discipline along with new forms of infinite-state automata, such as pushdown automata.

1956 saw the publication of Automata Studies, which collected work by scientists including Claude Shannon, W. Ross Ashby, John von Neumann, Marvin Minsky, Edward F. Moore, and Stephen Cole Kleene.[4] With the publication of this volume, "automata theory emerged as a relatively autonomous discipline". The book included Kleene's description of the set of regular events, or regular languages, and a relatively stable measure of complexity in Turing machine programs by Shannon.[5] In the same year, Noam Chomsky described the Chomsky hierarchy, a correspondence between automata and formal grammars,[6] and Ross Ashby published An Introduction to Cybernetics, an accessible textbook explaining automata and information using basic set theory.

The study of linear bounded automata led to the Myhill–Nerode theorem,[7] which gives a necessary and sufficient condition for a formal language to be regular, and an exact count of the number of states in a minimal machine for the language. The pumping lemma for regular languages, also useful in regularity proofs, was proven in this period by Michael O. Rabin and Dana Scott, along with the computational equivalence of deterministic and nondeterministic finite automata.[8]

In the 1960s, a body of algebraic results known as "structure theory" or "algebraic decomposition theory" emerged, which dealt with the realization of sequential machines from smaller machines by interconnection.[9] While any finite automaton can be simulated using a universal gate set, this requires that the simulating circuit contain loops of arbitrary complexity. Structure theory deals with the "loop-free" realizability of machines.The theory of computational complexity also took shape in the 1960s.[10] [11] By the end of the decade, automata theory came to be seen as "the pure mathematics of computer science".[12]

Automata

What follows is a general definition of an automaton, which restricts a broader definition of a system to one viewed as acting in discrete time-steps, with its state behavior and outputs defined at each step by unchanging functions of only its state and input.[12]

Informal description

An automaton runs when it is given some sequence of inputs in discrete (individual) time steps (or just steps). An automaton processes one input picked from a set of symbols or letters, which is called an input alphabet. The symbols received by the automaton as input at any step are a sequence of symbols called words. An automaton has a set of states. At each moment during a run of the automaton, the automaton is in one of its states. When the automaton receives new input, it moves to another state (or transitions) based on a transition function that takes the previous state and current input symbol as parameters. At the same time, another function called the output function produces symbols from the output alphabet, also according to the previous state and current input symbol. The automaton reads the symbols of the input word and transitions between states until the word is read completely, if it is finite in length, at which point the automaton halts. A state at which the automaton halts is called the final state.

To investigate the possible state/input/output sequences in an automaton using formal language theory, a machine can be assigned a starting state and a set of accepting states. Then, depending on whether a run starting from the starting state ends in an accepting state, the automaton can be said to accept or reject an input sequence. The set of all the words accepted by an automaton is called the language recognized by the automaton. A familiar example of a machine recognizing a language is an electronic lock, which accepts or rejects attempts to enter the correct code.

Formal definition

Automaton

M=\langle\Sigma,\Gamma,Q,\delta,λ\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,

Q

is a set of states,

\delta

is the next-state function or transition function

\delta:Q x \Sigma\toQ

mapping state-input pairs to successor states,

λ

is the next-output function

λ:Q x \Sigma\to\Gamma

mapping state-input pairs to outputs.

If

Q

is finite, then

M

is a finite automaton.[12]
Input word
  • An automaton reads a finite string of symbols

    a1a2...an

    , where

    ai\in\Sigma

    , which is called an input word. The set of all words is denoted by

    \Sigma*

    .
    Run
  • A sequence of states

    q0,q1,...,qn

    , where

    qi\inQ

    such that

    qi=\delta(qi-1,ai)

    for

    0<i\len

    , is a run of the automaton on an input

    a1a2...an\in\Sigma*

    starting from state

    q0

    . In other words, at first the automaton is at the start state

    q0

    , and receives input

    a1

    . For

    a1

    and every following

    ai

    in the input string, the automaton picks the next state

    qi

    according to the transition function

    \delta(qi-1,ai)

    , until the last symbol

    an

    has been read, leaving the machine in the final state of the run,

    qn

    . Similarly, at each step, the automaton emits an output symbol according to the output function

    λ(qi-1,ai)

    .

    The transition function

    \delta

    is extended inductively into

    \overline\delta:Q x \Sigma*\toQ

    to describe the machine's behavior when fed whole input words. For the empty string

    \varepsilon

    ,

    \overline\delta(q,\varepsilon)=q

    for all states

    q

    , and for strings

    wa

    where

    a

    is the last symbol and

    w

    is the (possibly empty) rest of the string,

    \overline\delta(q,wa)=\delta(\overline\delta(q,w),a)

    .[9] The output function

    λ

    may be extended similarly into

    \overlineλ(q,w)

    , which gives the complete output of the machine when run on word

    w

    from state

    q

    .
    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

    λ

    with

    q0\inQ

    , a designated start state, and

    F

    , a set of states of

    Q

    (i.e.

    F\subseteqQ

    ) called accept states.

    This allows the following to be defined:

    Accepting word
  • A word

    w=a1a2...an\in\Sigma*

    is an accepting word for the automaton if

    \overline\delta(q0,w)\inF

    , that is, if after consuming the whole string

    w

    the machine is in an accept state.
    Recognized language
  • The language

    L\subseteq\Sigma*

    recognized by an automaton is the set of all the words that are accepted by the automaton,

    L=\{w\in\Sigma*|\overline\delta(q0,w)\inF\}

    .[13]
    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.

    Variant definitions of automata

    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
    States
    Transition function
    Acceptance condition

    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.

    Automata theory also studies the existence or nonexistence of any effective algorithms to solve problems similar to the following list:

    Types of automata

    The following is an incomplete list of types of automata.

    AutomatonRecognizable languages
    Nondeterministic/Deterministic finite-state machine (FSM)regular languages
    Deterministic pushdown automaton (DPDA)deterministic context-free languages
    Pushdown automaton (PDA)context-free languages
    Linear bounded automaton (LBA)context-sensitive languages
    Turing machinerecursively enumerable languages
    Deterministic Büchi automatonω-limit languages
    Nondeterministic Büchi automatonω-regular languages
    Rabin automaton, Streett automaton, Parity automaton, Muller automaton
    Weighted automaton

    Discrete, continuous, and hybrid automata

    Normally automata theory describes the states of abstract machines but there are discrete automata, analog automata or continuous automata, or hybrid discrete-continuous automata, which use digital data, analog data or continuous time, or digital and analog data, respectively.

    Hierarchy in terms of powers

    The following is an incomplete hierarchy in terms of powers of different types of virtual machines. The hierarchy reflects the nested categories of languages the machines are able to accept.[14]

    Applications

    Each model in automata theory plays important roles in several applied areas. Finite automata are used in text processing, compilers, and hardware design. Context-free grammar (CFGs) are used in programming languages and artificial intelligence. Originally, CFGs were used in the study of human languages. Cellular automata are used in the field of artificial life, the most famous example being John Conway's Game of Life. Some other examples which could be explained using automata theory in biology include mollusk and pine cone growth and pigmentation patterns. Going further, a theory suggesting that the whole universe is computed by some sort of a discrete automaton, is advocated by some scientists. The idea originated in the work of Konrad Zuse, and was popularized in America by Edward Fredkin. Automata also appear in the theory of finite fields: the set of irreducible polynomials that can be written as composition of degree two polynomials is in fact a regular language.Another problem for which automata can be used is the induction of regular languages.

    Automata simulators

    Automata simulators are pedagogical tools used to teach, learn and research automata theory. An automata simulator takes as input the description of an automaton and then simulates its working for an arbitrary input string. The description of the automaton can be entered in several ways. An automaton can be defined in a symbolic language or its specification may be entered in a predesigned form or its transition diagram may be drawn by clicking and dragging the mouse. Well known automata simulators include Turing's World, JFLAP, VAS, TAGS and SimStudio.[15]

    Category-theoretic models

    One can define several distinct categories of automata[16] following the automata classification into different types described in the previous section. The mathematical category of deterministic automata, sequential machines or sequential automata, and Turing machines with automata homomorphisms defining the arrows between automata is a Cartesian closed category,[17] it has both categorical limits and colimits. An automata homomorphism maps a quintuple of an automaton Ai onto the quintuple of another automaton Aj. Automata homomorphisms can also be considered as automata transformations or as semigroup homomorphisms, when the state space, S, of the automaton is defined as a semigroup Sg. Monoids are also considered as a suitable setting for automata in monoidal categories.[18] [19] [20]

    Categories of variable automataOne could also define a variable automaton, in the sense of Norbert Wiener in his book on The Human Use of Human Beings via the endomorphisms

    Ai\toAi

    . Then one can show that such variable automata homomorphisms form a mathematical group. In the case of non-deterministic, or other complex kinds of automata, the latter set of endomorphisms may become, however, a variable automaton groupoid. Therefore, in the most general case, categories of variable automata of any kind are categories of groupoids or groupoid categories. Moreover, the category of reversible automata is then a 2-category, and also a subcategory of the 2-category of groupoids, or the groupoid category.

    See also

    Further reading

    External links

    Notes and References

    1. Web site: The Structures of Computation and the Mathematical Structure of Nature . Michael S. . Mahoney . The Rutherford Journal . 7 June 2020 .
    2. Book: Booth , Taylor . 1967 . Sequential Machines and Automata Theory . New York . John Wiley & Sons . 1-13 . 0-471-08848-X.
    3. Ashby . William Ross . January 15, 1967 . The Place of the Brain in the Natural World . Currents in Modern Biology . 1 . 2 . 95–104 . 10.1016/0303-2647(67)90021-4 . 6060865 . 2021-03-29 . 2023-06-04 . https://web.archive.org/web/20230604002636/http://rossashby.info/Ashby-Mechanisms_of_intelligence.pdf#16 . dead.

      "The theories, now well developed, of the "finite-state machine" (Gill, 1962), of the "noiseless transducer" (Shannon and Weaver, 1949), of the "state-determined system" (Ashby, 1952), and of the "sequential circuit", are essentially homologous."

    4. Book: Ashby , W. R. . etal . C.E. Shannon . J. McCarthy . 1956 . Automata Studies . Princeton, N.J. . Princeton University Press.
    5. Book: Li . Ming . Vitanyi . Paul . 1997 . An Introduction to Kolmogorov Complexity and its Applications . New York . Springer-Verlag . 84.
    6. Chomsky . Noam . Noam Chomsky . 1956 . Three models for the description of language . 10.1109/TIT.1956.1056813 . IRE Transactions on Information Theory . 2 . 3 . 113–124 . 19519474 . https://web.archive.org/web/20160307035549/https://chomsky.info/wp-content/uploads/195609-.pdf . 2016-03-07 . live .
    7. Nerode. A.. Anil Nerode. 1958. Linear Automaton Transformations. Proceedings of the American Mathematical Society. 9. 4. 541. 10.1090/S0002-9939-1958-0135681-9. free.
    8. Rabin . Michael . Michael O. Rabin. Scott . Dana . Dana Scott . Apr 1959 . Finite Automata and Their Decision Problems . IBM Journal of Research and Development . 3 . 2 . 114–125 . 10.1147/rd.32.0114 . unfit . https://web.archive.org/web/20101214122150/http://www.cse.chalmers.se/~coquand/AUTOMATA/rs.pdf . December 14, 2010 .
    9. Book: Hartmanis . J.. Juris Hartmanis . Stearns . R.E.. Richard E. Stearns . 1966 . Algebraic Structure Theory of Sequential Machines . Englewood Cliffs, N.J. . Prentice-Hall.
    10. Web site: Hartmanis. J.. Stearns. R. E.. 1964. Computational complexity of recursive sequences.
    11. Web site: Fortnow. Lance. Homer. Steve. 2002. A Short History of Computational Complexity.
    12. Book: Arbib , Michael . 1969 . Theories of Abstract Automata . Englewood Cliffs, N.J. . Prentice-Hall.
    13. Moore . Cristopher . Automata, languages, and grammars . cs.CC . July 31, 2019 . 1907.12713 .
    14. Book: Yan, Song Y.. An Introduction to Formal Languages and Machine Computation. 1998. World Scientific Publishing Co. Pte. Ltd.. Singapore. 155–156. 978-981-02-3422-5.
    15. Chakraborty. P.. Saxena . P. C.. Katti. C. P.. 2011. Fifty Years of Automata Simulation: A Review. ACM Inroads . 2. 4. 59–70. 10.1145/2038876.2038893. 6446749.
    16. Jirí Adámek and Věra Trnková. 1990. Automata and Algebras in Categories. Kluwer Academic Publishers:Dordrecht and Prague
    17. Book: Mac Lane, Saunders. Saunders Mac Lane. Categories for the Working Mathematician. Springer. New York . 1971. 978-0-387-90036-0.
    18. http://www.math.cornell.edu/~worthing/asl2010.pdf James Worthington.2010.Determinizing, Forgetting, and Automata in Monoidal Categories. ASL North American Annual Meeting, 17 March 2010
    19. Aguiar, M. and Mahajan, S.2010. "Monoidal Functors, Species, and Hopf Algebras".
    20. Meseguer, J., Montanari, U.: 1990 Petri nets are monoids. Information and Computation 88:105–155