Automata Theory, Formal Languages & Regular Expressions

Wikipedia

In theoretical computer science, automata theory is the study of abstract machines and the problems that they are able to solve. Automata theory is closely related to formal language theory as the automata are often classified by the type of formal languages that they are able to recognize (see below: push down automata, linear bounded automata and Turing machines). (Wikipedia)

An automaton is a mathematical model for a finite state machine (FSM). A FSM is a machine that, given an input of symbols, moves through a series of states according to a transition function. A FSM is a model of behaviour composed of a finite number of states, transitions between those states, and actions. It is similar to a "flow graph" where we can inspect the way in which the logic runs when certain conditions are met. A finite state machine is an abstract model of a machine with a primitive internal memory. The input stream to a FSM is a tape from which symbols are read and to which they can be written. 'Memory' is what is written on the tape. A FSM can also be expressed as a table. (Wikipedia)

Here is an example of a FSM reading the word 'nice': link.

The input is read symbol by symbol, until it is consumed completely (similar to a tape with a word written on it, which is read by a reading head of the automaton; the head moves forward over the tape, reading one symbol at a time). When the input is exhausted, the automaton is said to have stopped. (Wikipedia)

Depending on the state in which the automaton stops, the automaton either accepts or rejects the input. If it lands in an accept state, then the automaton accepts the word. If, on the other hand, it lands on a reject state, the word is rejected. The set of all the words accepted by an automaton is called the language accepted by the automaton.

Automata play a major role in compiler design and parsing. The distinction between FSM and FSA is that a FSM displays output while a FSA does not; a FSA will evaulate the input and produce output of Yes (acceptance of the input as valid) or No (non-acceptance: the input is invalid).

Basic Concepts

These basic concepts are common to most descriptions of automata:

Types of Automata

There are three types of finite automata:

Extensions of finite automata