Compiling principle Learning

Source: Internet
Author: User

Compiling principle Learning notes----

Uncertain there is a poor automaton (NFA)

an uncertain have poor automaton T is a five-tuple, m={k,∑,f,s,z}⒈k is a poor set of his every element called a state. ⒉∑ is an alphabet, and each of his elements is called an input symbol. ⒊f is a subset mapping from kx∑* to K, which is k*∑*->2^k, where 2^k represents the power set of K. The ⒋s is contained in the K-set, which is a non-empty initial set. The ⒌z contained in K is a non-empty end-state set.

Determination of a poor automaton (DFA)

A deterministic have-poor automaton M is a five-tuple: m= (k,∑, f,s,z) wherein,

1) k is a having a poor set, and each of his elements is called a state.

2) ∑ is a poor alphabet, and each of his elements is called an input symbol, so ∑ is called the input symbol table.

3) F is the conversion function, is the image on the kx∑-->k, such as f (ki,a) =kj which means that the current state is K, after the input character a, will be converted to the next state kj, we call KJ a successor State of Ki;

4) s belongs to K, is the only one out of the state.

5) z belongs to K, which is an end state, also known as an acceptable state or an end state.

For example:

This DFA can represent a state diagram:

It can also be displayed with a state matrix, the row represents the state, the column represents the input symbol, and the end state is labeled 1 at the right end of the table, and the non-final state is labeled 0 on the right of the table.

Compiling principle Learning

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.