Basic Concepts
Definition
Determine that finite state automation is composed
- A set of non-null finite States Q
- One input alphabet Σ (a set of non-null and finite characters)
- One transfer function (single-value ing) (for example :)
- A start status
- A set of acceptance states (ending states ).
The 5-tuples. Therefore, a DFA can be written as follows :.
Informal Semantics
Determines that the finite state automatically reads a string one character after another, and transfers it to the next state step by step based on the given transfer function. After reading the string, if the automatic machine stops in the accept status of F, it accepts the string, and vice versa.
Extended Transfer Functions
To prove the proposition of DFA, a formal mathematical semantic definition is required.
To this end, we define an extended transfer function.
- It is the state in which the automatic machine reads the string w from the q sequence.
- Extended Transfer Function recursion is defined:
Formal Semantics
For a finite-state automatic machine, if
In this example, the automatic machine accepts the string w. Otherwise, the automatic machine rejects the string w.
A language accepted by a definite finite automatic machine (or "recognized language") is defined as an accepted string, which is a set of all accepted strings.
Advantages and disadvantages
DFA is the most practical computing model, because online algorithms with ordinary linear time and constant space are used to simulate DFA on the input stream. Given two DFA algorithms, there are effective algorithms to find the Union, intersection, and population DFA that recognize the languages they recognize. There are also effective algorithms to determine whether a DFA accepts any string, whether a DFA accepts all strings, whether two DFA recognizes the same language, and find a very small number of States for a specific regular language
DFA.
On the other hand, DFA has strict restrictions on recognizable languages-many simple languages, including any problem that requires more than a constant space, cannot be identified by DFA. The typical simple language that DFA cannot recognize is the bracket language, which is a language consisting of correct matching parentheses, such (()()). By shapeAnbnIs a limited number of a, followed by an equal number of B. It can be proved that no DFA has sufficient status to recognize this language.
Others
- The language that can be identified by finite state automation is a regular language.
- Determining a finite state automation is a limit form of a non-deterministic finite state automation.
- Deterministic Finite State Automation is equivalent to non-deterministic finite state automation in terms of computing power.
- A Finite State Machine with no acceptance status list and no start status is specified is called a transfer system or semi-automatic machine.
Example
The following is an example of finite state automation.
Status chart
Determine Finite State Automation
- Q= {S1,S2}
- Σ = {0, 1}
- S=S1
- F= {S1}
- Delta is defined by the following status transition table:
-
- The corresponding transfer function is:
- Delta (S1, 0) =S2
- Delta (S1, 1) =S1
- Delta (S2, 0) =S1
- Delta (S2, 1) =S2
StatusS1 indicates that there are even numbers of 0 in the input string, whileS2 indicates that there are odd numbers of 0. In the input, 1 does not change the status of the automatic machine. After reading the input string, the status shows whether the input string contains an even number of 0.
The language that can be recognized is. The regular expression is: (1 *
(01*0 )*)*.
Closeness and some computation closeness
Determine the intersection, sum, difference, population, connection, replacement, homomorphic, inverse homomorphic, and other operations of finite state automatic machines, that is to say, the new automatic mechanism generated by the finite state automation through these operations also determines the finite state automation.
Complement operation
Is a DFA, then the new DFA generated by the complement operation is defined:
. Obviously, you only need to set the accepted status to the unacceptable status and the unacceptable status to the accepted status.
. The complexity of the complement operation is :.
Intersection and merge operations
There are two DFA, and
The new automatic mechanism created by the two DFA is defined :. Where
, Is the starting status,
And is defined as follows :.
- In this case
It is the intersection operation of DFA and recorded:
. That is to say, for the read string w, and only when and
Accept w at the same time.
- In this case
It is the merge operation of the DFA and is recorded:
. That is to say, for the read string w, As long as or
If there is at least one accept w, then accept w.
The intersection and merge operations are both complex.
Homomorphic and inverse homomorphic operations
A same-state function can be recursively defined:
So there is. (The above is a null character ,)
- : For DFA that accepts language L, as long as it represents
The edge is replaced by a sequence and a new State that does not belong to the original DFA state is added to it, a DFA that accepts the language h (L) is generated.
- : Define
And define the new transfer function
Is the new DFA generated by the inverse homomorphic operation.
In addition, the replacement operation is similar to the inverse homomorphic operation.
Minimum Automatic Machine
Equivalent automatic machines
For a regular language, assume that the equivalent automatic machine of the language is a 5-tuple. It is defined as follows:
- Q is an equivalent relation ~ Set of L equivalence classes:
~ L is called the Nerode relation and is the basis of the Myhill-Nerode theorem. Simply put
, If, then x ~ Ly.
Uniqueness
For any given deterministic finite state automation, a minimum deterministic finite state automation equivalent to its computing capability can be found. The number of States in the minimum automatic machine is equal to the number of medium-price relationships that can recognize equivalence-type automatic machines in the same language. We can call it the minimum automatic machine and the equivalence-Type Automatic Machine "actually" are equal, that is, homogeneous. Informal statement: any State on the minimum automatic machine can be transformed into a State on the equivalent automatic machine through an homogeneous function.
It is unique to recognize the equivalent automatic machines of a regular language. Therefore, the minimum automatic machines that can recognize the language are also unique.
Algorithm
Define a non-equivalent relationship:, the following steps can get this set N:
- If, all the status pairs (p, q) and (q, p) are marked
- Repeat Step 3 until the marked status has not changed
- For unmarked status pairs (p, q) and σ, if they are marked, (p, q) is also marked
- The set of all the marked State pairs above is the non-equivalent relationship N.
The following are the steps to convert any DFA to a minimum DFA:
- Delete all statuses that cannot be reached from the Starting Status
- Calculate the non-equivalent relationship N using the above marking algorithm
- One step merges two States that do not belong to N into one State
In this way, we can obtain the smallest automatic machine that accepts the same language. The complexity is.
See
- Finite State Automation with no Loops
- Uncertain Finite State Automation
- Turing Machine
- Read Only the right-hand Turing Machine