《Introduction to the Theory of Computation》里的自动机部分的定义和定理。

Finite automaton

A finite automaton is a 5-tuple , where

  1. is a finite set called the states,
  2. is a finite set called the alphabet,
  3. is the transition function
  4. is the start state, and
  5. is the set of accept states.

A string w is accepted by M if M read w, enter accept states.

If A is the set of all strings that machine M accepts, we say that A is the
language of machine M and write L(M ) = A. We say that M recognizes A or
that M accepts A.

A string w is rejected iff w is not accepted.

Nondeterministic finite automaton

A nondeterministic finite automaton is a 5-tuple , where

  1. is a finite set of states,
  2. is a finite alphabet,
  3. is the transition function,
  4. is the start state, and
  5. is the set of accept states.

Note: 中包含一个空字符

只需证明: Every nondeterministic finite automaton has an equivalent deterministic finite
automaton.

two automaton is equivalent iff they recogize same language

证明:将的幂集作为的状态,状态的闭包表示从状态只经过所能到达的所有状态的集合
构造的如下:

  1. 状态集:
  2. 符号表: =
  3. 状态转移函数:
  4. 初始状态:
  5. 接受状态:

Regular language

A language is called a regular language if some finite automatonrecognizes it.

A language is regular if and only if some nondeterministic finite automaton recognizes it.

Regular operations

Let and be regular languages. We define the regular operations union, concatenation, and star as follows:

  • Union: or .
  • Concatenation: and .
  • Star: and each .

the collection of regular languages is closed under all three of the regular operations.

Regular expression

Say that is a regular expression if is

  1. for some in the alphabet ,
  2. ,
  3. ,
  4. , where and are regular expressions,
  5. , where and are regular expressions, or
  6. , where is a regular expression.

In items 1 and 2 , the regular expressions and represent the
languages and , respectively. In item 3 , the regular expres-
sion represents the empty language. In items 4,5 , and 6 , the
expressions represent the languages obtained by taking the union
or concatenation of the languages and , or the star of the
language , respectively.

to be the language of .

Regular language is equivalent to language described by regular expression

A language is regular if and only if some regular expression describes it.

Pumping lemma

Pumping lemma If is a regular language, then there is a number (the pumping length) where if is any string in of length at least , then may be divided into three pieces, , satisfying the following conditions:

  1. for each ,
  2. , and
  3. .