A ‾ ‾ = A \overline{\overline{A}} = A A=A
A ∪ B ‾ = A ‾ ∩ B ‾ \overline{A \cup B} = \overline{A} \cap \overline{B} A∪B=A∩B
A ∩ B ‾ = A ‾ ∪ B ‾ \overline{A\cap{B}} = \overline{A} \cup \overline{B} A∩B=A∪B
空集 ∅ \emptyset ∅
A ∩ B = ∅ A\cap B = \emptyset A∩B=∅
∣ A ∣ |A| ∣A∣ 表示集合A中的元素个数
S = a , b , c S = {a,b,c} S=a,b,c
P ( S ) = 2 S = S = { ∅ , { a } , { b } , { c } , { a , b } , { a , c } , { b , c } , { a , b , c } } P(S) = 2^S = S = \{ \emptyset , \{ a \}, \{ b \} , \{ c \} , \{a,b \},\{a,c\},\{b,c\},\{a,b,c\} \} P(S)=2S=S={∅,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c}}
Observation $ |2^S| = 2^{|S|}$
∣ A × B ∣ = ∣ A ∣ × ∣ B ∣ |A\times B| = |A| \times |B| ∣A×B∣=∣A∣×∣B∣
A − > B A -> B A−>B
If A = domain
then f is a total function
otherwise f is a partial function
f : A -> B is a bijection 双射
Ω ( n ) \Omega(n) Ω(n) 下界
O ( n ) O(n) O(n) 上界
θ ( n ) \theta(n) θ(n)
rate of growth
Given two sets, A and B, a relation R is any subset of A x B, in orther words, R ⊆ A × B R\subseteq A \times B R⊆A×B
等价关系
等价类
partial order
偏序关系
reflexive, transitive and antisymmetric
total order
全序关系
linear order
线性关系
、
root,leaf,height
Length: The length of a string x is the number of symbols contained in the string x, denoted by |x|
w = a 1 a 2 a 3 . . . a n → ∣ w ∣ = n w = a_1 a_2 a_3...a_n \rightarrow |w| = n w=a1a2a3...an→∣w∣=n
λ w = w λ = w \lambda w = w \lambda = w λw=wλ=w
w n = w w w . . . w w^n = www...w wn=www...w (n个w)
( a b b s ) 2 = a b b a a b b a (abbs)^2 = abbaabba (abbs)2=abbaabba
w 0 = λ w^0 = \lambda w0=λ
If x = λ x = \lambda x=λ ,then ok.
If ∣ x ∣ = 1 |x| = 1 ∣x∣=1,then no solution.
If ∣ x ∣ = 2 |x| = 2 ∣x∣=2,then no solution.
If ∣ x ∣ ≥ 3 |x| \ge 3 ∣x∣≥3,then x = 011y . Hence,
011x = 011y011. So, x = y011.
Hence, 011y = y011.
x = ( 011 ) k f o r k ≥ 0 x = (011)^k \quad for \quad k \ge 0 x=(011)kfork≥0
$\sum ^* : $ the set of all possible strings from alphabet $ \sum$
Example:
∑ = { a , b } \sum = \{a,b\} ∑={a,b}
∑ ∗ = { λ , a , b , a a , a b , b a , b b , a a a . . . } \sum^* = \{ \lambda, a,b, aa,ab,ba,bb,aaa...\} ∑∗={λ,a,b,aa,ab,ba,bb,aaa...}
∑ + = ∑ ∗ − { λ } \sum ^+ = \sum ^ * - \{ \lambda \} ∑+=∑∗−{λ}
A language is a set of strings, is any subset of ∑ ∗ \sum^* ∑∗
Note that: ∅ = { } ≠ λ \emptyset = \{ \} \ne {\lambda} ∅={}=λ
L R = { w R : w ∈ L } L^R = \{ w^R:w\in L \} LR={wR:w∈L}
L 1 L 2 = { x y : x ∈ L 1 , y ∈ L 2 } L_1 L_2 = \{ xy: x\in L_1, y \in L_2 \} L1L2={xy:x∈L1,y∈L2}
L n = L L . . . L L^n = LL...L Ln=LL...L
Special case: L 0 = { λ } L^0 = \{ \lambda \} L0={λ}
$L^* = L^0 \cup L^1 \cup L^2 … L^n $
L + = L ∗ − { λ } L^+ = L^* - \{ \lambda \} L+=L∗−{λ}
R ∪ ( S ∩ T ) = ( R ∪ S ) ∩ ( R ∪ T ) R\cup(S\cap T) = (R \cup S) \cap (R \cup T) R∪(S∩T)=(R∪S)∩(R∪T)
b e g i n : begin: begin:
当:
E : = R ∪ ( S ∩ T ) F : = ( R ∪ S ) ∩ ( R ∪ T ) E := R\cup (S \cap T) \quad F:= (R\cup S) \cap(R \cup T) E:=R∪(S∩T)F:=(R∪S)∩(R∪T)
x ∈ R ∪ ( S ∩ T ) x \in R \cup(S\cap T) x∈R∪(S∩T)
x ∈ R o r x ∈ ( S ∩ T ) x\in R \quad or \quad x\in (S\cap T) x∈Rorx∈(S∩T)
x ∈ R ∪ S a n d x ∈ R ∪ T x\in R\cup S \quad and \quad x\in R \cup T x∈R∪Sandx∈R∪T
x ∈ ( R ∪ S ) ∩ ( R ∪ T ) x\in (R\cup S) \cap (R \cup T) x∈(R∪S)∩(R∪T)
仅当:
bulabula…
e n d end end
不存在整数对a和b,使得 a m o d b = b m o d a a \mod b = b \mod a amodb=bmoda
当需要处理成双的对象时,利用对称性常常有可能简化对象之间的关系,例如假设a
利用多个基础情形,对于某个 j > i j \gt i j>i,证明 S ( i ) , S ( i + 1 ) . . . S ( j ) S(i),S(i+1)...S(j) S(i),S(i+1)...S(j) 证明 S ( n + 1 ) S(n+1) S(n+1)时,利用所有命题 S ( i ) , S ( i + 1 ) , . . . S ( n ) S(i),S(i+1),...S(n) S(i),S(i+1),...S(n) 而不是只利用 S ( n ) S(n) S(n) 如果 ∑ \sum ∑是字母表, L L L是 ∑ \sum ∑ 上的语言,问题 L L L就是:给定 ∑ ∗ \sum^* ∑∗中的一个串 ω \omega ω ,判定串 ω \omega ω是否属于L更一般的整数归纳法
证明3 判定一个给定的串是否属于某个具体语言的提问
"问题"的定义的一个可能不令人满意的方面是:人们常常不认为问题是判定问题(以下是否为真),而是认为是计算或者变换某个输入的请求(找出完成任务的最佳方法)