Determine Finite State Automation

Source: Internet
Author: User

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
  1. The language that can be identified by finite state automation is a regular language.
  2. Determining a finite state automation is a limit form of a non-deterministic finite state automation.
  3. Deterministic Finite State Automation is equivalent to non-deterministic finite state automation in terms of computing power.
  4. 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:
  0 1
S1 S2 S1
S2 S1 S2
  • 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 :.

  1. 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.
  2. 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 ,)

  1. : 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.
  2. : 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:

  1. If, all the status pairs (p, q) and (q, p) are marked
  2. Repeat Step 3 until the marked status has not changed
  3. For unmarked status pairs (p, q) and σ, if they are marked, (p, q) is also marked
  4. 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:

  1. Delete all statuses that cannot be reached from the Starting Status
  2. Calculate the non-equivalent relationship N using the above marking algorithm
  3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.