1.1 Finite Automata

定义1.5(FA)

A finite autamation is a 5-tuple (Q,Σ,σ,q0,F)(Q,\Sigma,\sigma,q_0,F), where

  1. QQ is a finite set called the states,
  2. Σ\Sigma is a finite set called the alphabet,
  3. σ:Q×ΣQ\sigma:Q\times\Sigma\rightarrow Q is the transition function,
  4. q0Qq_0\in Q is the start state,
  5. FQF \subseteq Q is the set of accept states

状态转移图是描述FA的一种方法,但FA并不总能用图表示(当1.图太大,2.FA的包含变量时),所以不要认为FA就是状态转移图。

定义(FA's computation )

Let MM be a FA, and let w=w1w2...wn (wiΣ)w=w_1w_2...w_n\ (w_i\in\Sigma) be a string. Then MM accepts ww if a sequence of states r0,r1,...,rn (riQ)r_0,r_1,...,r_n\ (r_i\in Q) exists with three conditions:

  1. r0=q0r_0=q_0
  2. σ(ri,wi+1)=ri+1\sigma(r_i,w_{i+1})=r_{i+1}, for i=0,...,n1i=0,...,n-1
  3. rnFr_n\in F

如果A={wMA=\{w|Maccepts w}w\},则称MM recognizes language AA

定义1.16(regular language)

A launguage is called a regular launguage if some finite automaton recognizes it.

如何设计一个FA?

为具体的一种语言设计FA没有固有方法,是一个创作的过程。

NOTE: 字符串、language、机器(automata/machion)

定义1.23(regular operation)

以regular language为操作数的集合运算符称为regular operation。

Let AA and BB be languages. We define three regular operations as follows:

  • Union: AB={xxAorxB}A\cup B=\{x|x\in A or x\in B\}
  • Concatenation: AB={xyxA andyB}A\cdot B=\{xy|x\in A\ and y\in B\}
  • Star: A={x1x2...xkk0A^*=\{x_1x_2...x_k|k\ge 0 and each xiA}x_i\in A\}
定理(regular languages的封闭性)

The class of regular languages is closed under the Union, Concatenation and Star operation

证明方法:通过NFA+构造法

如果AABB是两个regular language,则ABA\cup B, ABA\cdot BAA^*依然是regular language

results matching ""

    No results matching ""