Yogh
See also: Automat
A finite-state machine (one says sometimes machine in finished states ), in English finite state automaton or finite state machine (FSA, FSM), is a abstract Machine used in theory of the Calculabilité and in the study of the formal languages.
An automat consists of states and transitions. Its behavior is directed by a Mot provided in entry: the automat passes from state in state, according to the transitions, with the reading of each letter of the entry. The automat known as “is finished” because it has a finished number of distinct states: it thus has only one limited memory.
A finite-state machine form a graph directed labelled, whose states are the tops and the transitions the labelled edges.
Use
There exist several types of machines in finished states. The “acceptors” produce at exit an answer “yes” or “not”, i.e. they accept (yes) or reject (not) the entry. The systems of recognition classify the entry by category. Lastly, the Capteur S are employed to produce a certain result according to the entry.
The finite-state machines can characterize languages (i.e., whole of words) finished (the standard case), languages of infinite words (automats of Rabin, automats of Büchi), or various types of trees (automats of trees).
Another distinction is made between the deterministic automats and nonthe determinists (whom it would be advisable to better qualify “nondeterminists”). An automat is deterministic if, for each one of its states, there is with more the one transition for each possible label. If there is one exactly of them, one speaks then about complete deterministic automat. In the nondeterministic automats, there can be an unspecified number of transitions starting from a state given for a given label. Here, the term “not determinist” is not the negation of “determinist”.
A finite-state machine not determinist is always transformable in a finite-state machine deterministic equivalent. In the worst of the cases, the deterministic automat product is exponentially taller (of many states) that the nondeterministic automat, but it is in general possible to decrease the number of states considerably of it.
Independently of the theory, the machines in finished states also meet in the digital circuits, where the entry, the state and the result are vectors of bits of fixed size (machines of Moore and machines of Mealy). In the machines of Mealy, the actions (left) are related to the transitions, while in the machines of Moore, the actions are related to the states.
Formal definitions
Deterministic finite-state machine
A deterministic finite-state machine (AFD) has is a quintuplet where:
- is a whole of states,
- is a Alphabet, i.e. a whole of letters,
- is a function of transition,
- is the starting state or initial state,
- and are a whole of states final “acceptors” or states.
The automat takes a word (made up of symbols of its alphabet) in entry and starts in its initial state. He traverses then the word by using the function transition in order to determine, for each letter, the next state to be traversed by using the state running and the symbol has just been read.
If, at the end of the reading, the machine is in a state acceptor, it is said that it accepts the entry. Otherwise, it is said that it rejects it.
The whole of the accepted entries form a language L, which is the language “recognized” by automat A. One says that “has recognizes the language L”. In other words, has recognizes all the words of L, and has refuses all the words of * (* indicates the star of Kleene) which are not in L.
A deterministic automat of Büchi operates on infinite words. An infinite word is accepted if the automat of Büchi passes an infinite number of times by the states acceptors when it reads this mot.
Finite-state machine not determinist
A finite-state machine not determinist (AFN) has is a quintuplet where:
- is a whole of states,
- is an alphabet,
- is a function of transition,
- is the initial state,
- and is a whole of final states.
is the Ensemble parts of (also noted ) and is the sequence of null size, so called “blank word”.
The machine starts in the starting state and receives in entry a sequence of symbols of its alphabet. It employs the relation of transition to determine the next states atteignables by using the states currently atteignables and the symbol has just been read. It is said that the nondeterministic automat accepts the entry if one of the states acceptors is atteignable at the end of the reading of the entry, i.e. if there exists at least a course of the states of the automat such as at the end the play-back head arrives on a final state). If not, rejects .
The whole of the accepted entries form a language generally indicated by .
Finite-state machine not generalized determinist
A finite-state machine not generalized determinist (AFNG) has is a quintuplet where:
- is a whole of states,
- is an alphabet,
- is a function of transition,
- is the initial state,
- and is the state acceptor.
is the whole of all the rational expressions on the alphabet .
A AFD or a AFN can easily be converted into AFNG and then the AFNG can be easily converted into rational expression by reducing the number of states until so that .
Examples of machines in finished states
Machine in finished states deterministic
The following example describes a machine in states finished deterministic on a binary alphabet, which determines if the entry contains an even number of .
- the function of transition is defined as follows:
So at the time of the course of an entry, one is with the state , that means that there was an even number of in the entry until now, if one is with the state , that means that there was an odd number of it. A in the entry does not change the state of the automat. When the entry finishes, the state will show if the entry contained an even number of or not.
Rational languages and recognizable languages
Stephen Kleene showed that the language S recognized by the finite-state machines are exactly the languages which can be described by the rational expressions. In other words, for any rational expression, one can build a finite-state machine (deterministic or not) which recognizes this expression; in the same way, for any finite-state machine (deterministic or not), one can express in the form of a rational expression the language which he recognizes.
See also: Theorem of Kleene
Optimization and setting in canonical form
To optimize or minimize a finite-state machine, i.e. to calculate the automat with more the small number of states and which recognizes the same language, is a problem décidable, unlike similar problems for more powerful data-processing machines. Moreover, it is possible to build a canonical version of any finite-state machine, in order to determine the equality of two automats.
These two problems can be solved by using a algorithm coloring.
Data-processing power
The machines in finished states can only identify rational languages, and consequently they are less powerful than the machines of Turing. There exist problems which one can decide but which is not calculable by using a machine in finished states.
For each nondeterministic machine having N states, a deterministic machine of equal power can be built with an algorithm. This deterministic machine has in worst case a number of states equal to the number of parts of the unit of the states of the initial machine, i.e. .
Representation
A machine in finished states can be represented by using a table of transition from state or a diagram of state.
Execution
A machine in finished states can be implemented in software form with a matrix of transition from state.
In certain cases, it is more advantageous to use a sparse Matrice implemented with dependant lists or enormous a Switch to detect the internal state and then different the switchs smaller to decode the symbol of entry.
A machine in finished states can also be implemented in material form with a device of programmable Logique.
Lastly, a more elegant and more flexible manner is to implement the owner of design state if the language lends itself to it.
See too
Related articles
- Automat with pile
- Automat of trees
- Machine of Turing
External bonds
-
Theory of the languages by François Yvon and Akim Demaille
| Random links: | Gossau (Saint-Gall) | Silicoflagellate | Hans Driesch | Nabe | Cherry brandy | Ryan Dickson | Yogh |