小马的世界

【形式语言与自动机】Cpt.1基础和导入

2021-07-29 · 3 min read
形式语言与自动机 数学

参考书目:Peter Linz, An Introduction to Formal Languages and Automata (6th Editon) 2016

Introduce to The Theory of Computation

Set

Powerset | 幂集

Example 1.1
If SS is the set {a,b,c}\{a, b, c \}, then its powerset is

2S={,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c}}2^S=\{\emptyset, \{a\}, \{b\}, \{c\}, \{a, b\}, \{a, c\}, \{b, c\}, \{a, b, c\}\}

Here S=3|S|=3 and 2S=8|2^S|=8. This is an instance of a general result; if SS is finite, then

2S=2S|2^S|=2^{|S|}

Cartesian Product | 笛卡尔积

For the Cartesian product of two sets, which itself is a set of ordered pairs, we write

S=S1×S2={(x,y):xS1,yS2}S=S_1 \times S_2 = \{(x,y):x \in S_1, y\in S_2\}

Partition | 分隔

A set can be divided by separating it into a number of subsets. Suppose that S1,S2,,SnS_1, S_2, \dotsc , S_n are subsets of a given set SS and that the following holds:

  1. The subsets S1,S2,,SnS_1, S_2, \dotsc , S_n are mutually disjoint;
  2. S1S2Sn=SS_1 \cup S_2 \cup \dotsc \cup S_n = S;
  3. none of the SiS_i is empty.

Then S1,S2,,SnS_1, S_2, \dotsc , S_n is called a partition of SS.

Relation

Equivalence Relation

A relation denoted by RR is considered an equivalence if it satisfies three rules

  1. the reflexivity rule|反身性
    xRxxRx for all xx;
  2. the symmetry rule |对称性
    if xRyxRy, then yRxyRx;
  3. the transitivity rule|传递性
    if xRyxRy and yRzyRz, then xRzxRz