教材是Discrete Mathematics and Its Applications 7th,做了一些简单的翻译和简单的笔记。
1. The Foundations: Logic and Proofs
ENG | CHN | Denote |
---|---|---|
negation | 否定 | ¬ p \neg p ¬p |
conjunction (and) | 合取 | p ∧ q p \land q p∧q |
disjunction (or) | 析取 | p ∨ q p \lor q p∨q |
exlusive or | 异或 | p ⊕ q p \oplus q p⊕q |
conditional statement/ implication | 蕴含 | p → q p \to q p→q |
biconditional statement | 等价 | p ↔ q p \leftrightarrow q p↔q |
tautology | 永真式 | ≡ 1 \equiv 1 ≡1 |
contingency | 可能式 | 0 / 1 0/1 0/1 |
contradiction | 矛盾式 | ≡ 0 \equiv 0 ≡0 |
proposition | 命题 | p → q p \to q p→q |
converse proposition | 逆命题 | q → p q \to p q→p |
inverse proposition | 否命题 | ¬ p → ¬ q \neg p \to \neg q ¬p→¬q |
contrapositive proposition | 逆否命题 | ¬ q → ¬ p \neg q \to \neg p ¬q→¬p |
Precedence of Logical Operators:
¬
>
∧
>
∨
>
→
>
↔
\neg\ >\ \land\ >\ \lor>\ \to\ >\ \leftrightarrow
¬ > ∧ > ∨> → > ↔
Implication Law:
p
→
q
≡
¬
p
∨
q
⟺
p \to q \equiv \neg p \lor q \iff
p→q≡¬p∨q⟺ if
p
p
p then
q
⟺
q
q \iff q
q⟺q if/when
p
⟺
p
p \iff p
p⟺p only if
q
⟺
q
q \iff q
q⟺q unless
¬
p
\neg p
¬p
Equivalence Law:
p
↔
q
≡
(
p
→
q
)
∧
(
q
→
p
)
⟺
p
p \leftrightarrow q \equiv (p \to q) \land (q \to p) \iff p
p↔q≡(p→q)∧(q→p)⟺p if and only if
q
⟺
p
q \iff p
q⟺p iff
q
q
q
Logical Equivalences:
Equivalence | ENG | CHN |
---|---|---|
p
∧
T
≡
p
p \land T \equiv p
p∧T≡p p ∨ F ≡ p p \lor F \equiv p p∨F≡p | Identity Laws | 同一律 |
p
∨
T
≡
T
p \lor T \equiv T
p∨T≡T p ∧ F ≡ F p \land F \equiv F p∧F≡F | Domination Laws | 零律 |
p
∨
p
≡
p
p \lor p \equiv p
p∨p≡p p ∧ p ≡ p p \land p \equiv p p∧p≡p | Idempotent Laws | 幂等律 |
¬ ( ¬ p ) ≡ p \neg (\neg p) \equiv p ¬(¬p)≡p | Double Negation Law | 双重否定律 |
p
∨
q
≡
q
∨
p
p \lor q \equiv q \lor p
p∨q≡q∨p p ∧ q ≡ q ∧ p p \land q \equiv q \land p p∧q≡q∧p | Comutative Laws | 交换律 |
(
p
∨
q
)
∨
r
≡
p
∨
(
q
∨
r
)
(p \lor q) \lor r \equiv p \lor (q \lor r)
(p∨q)∨r≡p∨(q∨r) ( p ∧ q ) ∧ r ≡ p ∧ ( q ∧ r ) (p \land q) \land r \equiv p \land (q \land r) (p∧q)∧r≡p∧(q∧r) | Associative Laws | 结合律 |
p
∨
(
q
∧
r
)
≡
(
p
∨
q
)
∧
(
p
∨
r
)
p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)
p∨(q∧r)≡(p∨q)∧(p∨r) p ∧ ( q ∨ r ) ≡ ( p ∧ q ) ∨ ( p ∧ r ) p \land (q \lor r) \equiv (p \land q) \lor (p \land r) p∧(q∨r)≡(p∧q)∨(p∧r) | Distributive Laws | 分配律 |
¬
(
p
∧
q
)
≡
¬
p
∨
¬
q
\neg (p \land q) \equiv \neg p \lor \neg q
¬(p∧q)≡¬p∨¬q ¬ ( p ∨ q ) ≡ ¬ p ∧ ¬ q \neg (p \lor q) \equiv \neg p \land \neg q ¬(p∨q)≡¬p∧¬q | De Morgan’s Laws | 德摩根定律 |
p
∨
(
p
∧
q
)
≡
p
p \lor (p \land q) \equiv p
p∨(p∧q)≡p p ∧ ( p ∨ q ) ≡ p p \land (p \lor q) \equiv p p∧(p∨q)≡p | Absorption Laws | 吸收律 |
p
∨
¬
p
≡
T
p \lor \neg p \equiv T
p∨¬p≡T p ∧ ¬ p ≡ F p \land \neg p \equiv F p∧¬p≡F | Negation Laws | 排中律 矛盾律 |
Show
p
≡
q
p \equiv q
p≡q :
a. Using truth tables
b. Using already-proved equivalences (Recommended)
Predicates and Quantifiers:
Universal Quantifier
∀
\forall
∀ :
∀
x
P
(
x
)
⟺
P
(
x
)
\forall xP(x) \iff P(x)
∀xP(x)⟺P(x) for all values of
x
x
x in the (restricted) domain
Existential Quantifier
∃
\exist
∃ :
∃
x
P
(
x
)
⟺
\exist xP(x) \iff
∃xP(x)⟺ There exists (at least) an element
x
x
x in the domain such that
P
(
x
)
P(x)
P(x)
De Morgan’s Laws for quantifiers:
¬
∀
x
P
(
x
)
≡
∃
x
¬
P
(
x
)
\neg \forall xP(x) \equiv \exist x \neg P(x)
¬∀xP(x)≡∃x¬P(x)
¬
∃
x
Q
(
x
)
≡
∀
x
¬
Q
(
x
)
\neg \exist xQ(x) \equiv \forall x \neg Q(x)
¬∃xQ(x)≡∀x¬Q(x)
Notice:
∀
\forall
∀ and
∃
\exist
∃ have higher precedence than any logical operators
Remark:
All
P
(
x
)
P(x)
P(x) are
Q
(
x
)
⟺
∀
x
(
P
(
x
)
→
Q
(
x
)
)
Q(x) \iff \forall x (P(x) \to Q(x))
Q(x)⟺∀x(P(x)→Q(x))
No
P
(
x
)
P(x)
P(x) are
Q
(
x
)
⟺
∀
x
(
P
(
x
)
→
¬
Q
(
x
)
)
Q(x) \iff \forall x (P(x) \to \neg Q(x))
Q(x)⟺∀x(P(x)→¬Q(x))
Some
P
(
x
)
P(x)
P(x) are
Q
(
x
)
⟺
∃
x
(
P
(
x
)
∧
Q
(
x
)
)
Q(x) \iff \exist x (P(x) \land Q(x))
Q(x)⟺∃x(P(x)∧Q(x))
Some
P
(
x
)
P(x)
P(x) are not
Q
(
x
)
⟺
∃
x
(
P
(
x
)
∧
¬
Q
(
x
)
)
Q(x) \iff \exist x (P(x) \land \neg Q(x))
Q(x)⟺∃x(P(x)∧¬Q(x))
eg. Recall that the definition of
lim
x
→
a
f
(
x
)
=
L
{\lim_{x \to a}f(x)=L}
x→alimf(x)=L is
∀
ϵ
>
0
∃
δ
>
0
∀
x
(
0
<
∣
x
−
a
∣
<
δ
→
∣
f
(
x
)
−
L
∣
<
ϵ
)
{\forall \epsilon>0\ \exist \delta>0\ \forall x(0<|x-a|<\delta \to |f(x)-L|<\epsilon)}
∀ϵ>0 ∃δ>0 ∀x(0<∣x−a∣<δ→∣f(x)−L∣<ϵ) And what is the inverse proposition of this statement?
Propositional Normal Forms:
ENG | CHN | Denote |
---|---|---|
Maxterm | 极大项 |
M
=
a
1
∨
a
2
∨
⋯
∧
a
i
∨
⋯
M=a_1 \lor a_2 \lor \cdots \land a_i \lor \cdots
M=a1∨a2∨⋯∧ai∨⋯ (there exists unique value of each a i a_i ai so that M = 0 M=0 M=0) |
Minterm | 极小项 |
m
=
b
1
∧
b
2
∧
⋯
∧
b
i
∧
⋯
m=b_1 \land b_2 \land \cdots \land b_i \land \cdots
m=b1∧b2∧⋯∧bi∧⋯ (there exists unique value of each b i b_i bi so that m = 1 m=1 m=1) |
Conjunctive Normal Form (CNF) | 合取范式 | C = A 1 ∧ A 2 ∧ ⋯ ∧ A i ∧ ⋯ C=A_1 \land A_2 \land \cdots \land A_i \land \cdots C=A1∧A2∧⋯∧Ai∧⋯, A i A_i Ai are propositions |
Disjunctive Normal Form (DNF) | 析取范式 | D = B 1 ∨ B 2 ∨ ⋯ ∨ B i ∨ ⋯ D=B_1 \lor B_2 \lor \cdots \lor B_i \lor \cdots D=B1∨B2∨⋯∨Bi∨⋯, B i B_i Bi are propositions |
Full Conjunctive Normal Form | 主合取范式 | X = M 1 ∧ M 2 ∧ ⋯ ∧ M i ∧ ⋯ X=M_1 \land M_2 \land \cdots \land M_i \land \cdots X=M1∧M2∧⋯∧Mi∧⋯, M i M_i Mi are maxterms |
Full Disjunctive Normal Form | 主析取范式 | Y = m 1 ∨ m 2 ∨ ⋯ ∨ m i ∨ ⋯ Y=m_1 \lor m_2 \lor \cdots \lor m_i \lor \cdots Y=m1∨m2∨⋯∨mi∨⋯, m i m_i mi are minterms |
Prenex Normal Form | 前约束范式 |
O
=
Q
1
z
1
Q
2
z
2
⋯
Q
n
z
n
E
O=Q_1z_1Q_2z_2 \cdots Q_nz_nE
O=Q1z1Q2z2⋯QnznE,
Q
i
=
∀
Q_i=\forall
Qi=∀ or
∃
\exist
∃, E E E is a quantifier-free proposition |
Transforming to Prenex Normal Form:
1.eliminate
→
\to
→ and
↔
\leftrightarrow
↔ by:
p
↔
q
≡
(
p
→
q
)
∧
(
q
→
p
)
≡
(
¬
p
∨
q
)
∧
(
¬
q
∨
p
)
≡
(
p
∧
q
)
∨
(
¬
p
∧
¬
q
)
p \leftrightarrow q \equiv (p \to q) \land (q \to p) \equiv (\neg p \lor q) \land (\neg q \lor p) \equiv (p \land q) \lor (\neg p \land \neg q)
p↔q≡(p→q)∧(q→p)≡(¬p∨q)∧(¬q∨p)≡(p∧q)∨(¬p∧¬q)
2.move all
¬
\neg
¬ inward by applying De Morgan’s Laws
3.rename variables to avoid ambiguity if necessary
4.move all quantifiers to the front by:
Q
x
A
(
x
)
∧
P
≡
Q
x
(
A
(
x
)
∧
P
)
Q xA(x) \land P \equiv Q x(A(x) \land P)
QxA(x)∧P≡Qx(A(x)∧P),
Q
x
A
(
x
)
∨
P
≡
Q
x
(
A
(
x
)
∨
P
)
Q xA(x) \lor P \equiv Q x(A(x) \lor P)
QxA(x)∨P≡Qx(A(x)∨P),
Q
′
x
A
(
x
)
∧
Q
′
′
y
B
(
y
)
≡
Q
′
x
Q
′
′
y
(
A
(
x
)
∧
B
(
y
)
)
Q'xA(x) \land Q''yB(y) \equiv Q'xQ''y(A(x) \land B(y))
Q′xA(x)∧Q′′yB(y)≡Q′xQ′′y(A(x)∧B(y)),
Q
′
x
A
(
x
)
∨
Q
′
′
y
B
(
y
)
≡
Q
′
x
Q
′
′
y
(
A
(
x
)
∨
B
(
y
)
)
Q'xA(x) \lor Q''yB(y) \equiv Q'xQ''y(A(x) \lor B(y))
Q′xA(x)∨Q′′yB(y)≡Q′xQ′′y(A(x)∨B(y)),
Q
x
Q
y
C
(
x
,
y
)
≡
Q
y
Q
x
C
(
x
,
y
)
QxQyC(x,y) \equiv QyQxC(x,y)
QxQyC(x,y)≡QyQxC(x,y),
where we have:
Q
,
Q
′
,
Q
′
′
=
∀
Q,Q',Q''=\forall
Q,Q′,Q′′=∀ or
∃
\exist
∃,
P
P
P is a quantifier-free proposition,
A
(
x
)
,
B
(
y
)
,
C
(
x
,
y
)
A(x),B(y),C(x,y)
A(x),B(y),C(x,y) are propositions.
*5.transform to Prenex CNF/DNF
Rules of Inference:
Rule | Tautology | ENG | CHN |
---|---|---|---|
p p → q ∴ q \begin{aligned} &p \\ &p \to q \\ \hline \therefore \; &q \end{aligned} ∴pp→qq | ( p ∧ ( p → q ) ) → q (p \land (p \to q)) \to q (p∧(p→q))→q | Modus ponens | 假言推理式 |
¬ q p → q ∴ ¬ p \begin{aligned} &\neg q \\ &p \to q \\ \hline \therefore \; &\neg p \end{aligned} ∴¬qp→q¬p | ( ¬ q ∧ ( p → q ) ) → ¬ p (\neg q \land (p \to q)) \to \neg p (¬q∧(p→q))→¬p | Modus tollens | 否定拒取式 |
p → q q → r ∴ p → r \begin{aligned}&p \to q \\ &q \to r \\ \hline \therefore \; &p \to r \end{aligned} ∴p→qq→rp→r | ( ( p → q ) ∧ ( q → r ) ) → ( p → r ) ((p \to q) \land (q \to r)) \to (p \to r) ((p→q)∧(q→r))→(p→r) | Hypothetical syllogism | 假言三段论 |
p ∨ q ¬ p ∴ q \begin{aligned}&p \lor q \\ &\neg p\\ \hline \therefore \; &q \end{aligned} ∴p∨q¬pq | ( ( p ∨ q ) ∧ ¬ p ) → q ((p \lor q) \land \neg p) \to q ((p∨q)∧¬p)→q | Disjunctive syllogism | 析取三段论 |
p ∴ p ∨ q \begin{aligned}&p \\ \hline \therefore \; &p \lor q \end{aligned} ∴pp∨q | p → ( p ∨ q ) p \to (p \lor q) p→(p∨q) | Addition | 附加律 |
p ∧ q ∴ q \begin{aligned}&p \land q \\ \hline \therefore \; &q \end{aligned} ∴p∧qq | ( p ∧ q ) → q (p \land q) \to q (p∧q)→q | Simplification | 消去律 |
p q ∴ p ∧ q \begin{aligned}&p \\ &q \\ \hline \therefore \; &p \land q \end{aligned} ∴pqp∧q | ( ( p ) ∧ ( q ) ) → ( p ∧ q ) ((p) \land (q)) \to (p \land q) ((p)∧(q))→(p∧q) | Conjunction | 合取式 |
p ∨ q ¬ p ∨ r ∴ q ∨ r \begin{aligned}&p \lor q \\ &\neg p \lor r \\ \hline \therefore \; &q \lor r \end{aligned} ∴p∨q¬p∨rq∨r | ( ( p ∨ q ) ∧ ( ¬ p ∨ r ) ) → ( q ∨ r ) ((p \lor q) \land (\neg p \lor r)) \to (q \lor r) ((p∨q)∧(¬p∨r))→(q∨r) | Resolution | 消解规则 |
p → r q → s p ∨ q ∴ r ∨ s \begin{aligned}&p \to r \\ &q \to s \\ &p \lor q \\ \hline \therefore \; &r \lor s \end{aligned} ∴p→rq→sp∨qr∨s | ( ( p → r ) ∧ ( q → r ) ∧ ( p ∨ q ) ) → ( r ∨ s ) ((p \to r) \land (q \to r) \land (p \lor q)) \to (r \lor s) ((p→r)∧(q→r)∧(p∨q))→(r∨s) | Constructive dilemma | 构造性两难 |
Remark: ( P 1 ∧ P 2 ∧ ⋯ ∧ P n ∧ P ) → Q ≡ ( P 1 ∧ P 2 ∧ ⋯ ∧ P n ) → ( P → Q ) (P_1 \land P_2 \land \cdots \land P_n \land P) \to Q \equiv (P_1 \land P_2 \land \cdots \land P_n) \to (P \to Q) (P1∧P2∧⋯∧Pn∧P)→Q≡(P1∧P2∧⋯∧Pn)→(P→Q)
Rule | Name |
---|---|
∀ x P ( x ) ∴ P ( c ) \begin{aligned}&\forall xP(x) \\ \hline \therefore \; &P(c) \end{aligned} ∴∀xP(x)P(c) , for an arbitary c c c | Universal instantiation (UI) |
P ( c ) ∴ ∀ x P ( x ) \begin{aligned}&P(c) \\ \hline \therefore \; &\forall xP(x) \end{aligned} ∴P(c)∀xP(x) , for an arbitary c c c | Universal generalization (UG) |
∃ x P ( x ) ∴ P ( c ) \begin{aligned}&\exist xP(x) \\ \hline \therefore \; &P(c) \end{aligned} ∴∃xP(x)P(c) , for some element c c c | Existential instantiation (EI) |
P ( c ) ∴ ∃ x P ( x ) \begin{aligned}&P(c) \\ \hline \therefore \; &\exist xP(x) \end{aligned} ∴P(c)∃xP(x) , for some element c c c | Existential generalization (EG) |
Remark: ∃ ! x s . t . P ( x ) ⟺ ∃ x ( P ( x ) ∧ ∀ y ( x ≠ y → ¬ P ( y ) ) ) \exist!x \; \mathrm{s.t.} \; P(x) \iff \exist x(P(x) \land \forall y(x \ne y \to \neg P(y))) ∃!xs.t.P(x)⟺∃x(P(x)∧∀y(x=y→¬P(y)))
2. Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Denote | ENG |
---|---|
N = { 0 , 1 , 2 , … } \mathbb{N}=\{0, 1, 2, \dots\} N={0,1,2,…} | Natural numbers |
Z = { … , − 1 , 0 , 1 , … } \mathbb{Z}=\{\dots, -1, 0, 1, \dots\} Z={…,−1,0,1,…} | Intergers |
Z + = { 1 , 2 , 3 , … } \mathbb{Z^+}=\{1, 2, 3, \dots\} Z+={1,2,3,…} | Positive integers |
Q = { p q ∣ p ∈ Z + ∪ Z − , q ∈ Z } \mathbb{Q}=\left\{\dfrac{p}{q} \, \Big \vert \, p \in \mathbb{Z}^+ \cup \mathbb{Z}^-, q \in \mathbb{Z} \right\} Q={qp∣∣∣p∈Z+∪Z−,q∈Z} | Rational numbers |
R \mathbb{R} R | Real numbers |
R + \mathbb{R^+} R+ | Positve real numbers |
C \mathbb{C} C | Complex numbers |
ENG | CHN | Denote | i.e. |
---|---|---|---|
Subset | 子集 | A ⊆ B A \subseteq B A⊆B | ∀ x ( x ∈ A → x ∈ B ) \forall x(x \in A \to x \in B) ∀x(x∈A→x∈B) |
Proper subset | 真子集 | A ⊂ B A \subset B A⊂B | ∀ x ( x ∈ A → x ∈ B ) ∧ ∃ x ( x ∈ B ∧ x ∉ A ) \forall x(x \in A \to x \in B) \land \exist x(x \in B \land x \notin A) ∀x(x∈A→x∈B)∧∃x(x∈B∧x∈/A) |
Equal | 等集 | A = B A=B A=B |
A
⊆
B
∧
B
⊆
A
A \subseteq B \land B \subseteq A
A⊆B∧B⊆A ∀ x ( x ∈ A ↔ x ∈ B ) \forall x(x \in A \leftrightarrow x \in B) ∀x(x∈A↔x∈B) |
Cardinality | 基数 | ∣ S ∣ Card ( S ) \vert S \vert \\ \operatorname{Card}(S) ∣S∣Card(S) | ∑ x ∈ S 1 \sum_{x \in S}1 x∈S∑1 |
Power set | 幂集 | P ( S ) \mathcal{P}(S) P(S) | ⋃ A ⊆ S { A } \bigcup_{A \subseteq S}\{A\} A⊆S⋃{A} |
Remark: for every set
S
S
S, we have
∅
∈
S
\varnothing \in S
∅∈S and
S
∈
S
S \in S
S∈S
Cartesian products(笛卡尔积):
A
×
B
=
{
(
a
,
b
)
∣
a
∈
A
∧
b
∈
B
}
A \times B=\{(a,b) \, \vert \, a \in A \land b \in B\}
A×B={(a,b)∣a∈A∧b∈B}
A
1
×
A
2
×
⋯
×
A
n
=
{
(
a
1
,
a
2
,
…
,
a
n
)
∣
∀
i
∈
{
1
,
2
,
…
,
n
}
(
a
i
∈
A
n
)
}
A_1 \times A_2 \times \cdots \times A_n=\{(a_1, a_2, \dots, a_n) \, \vert \, \forall i \in \{1, 2, \dots, n\}(a_i \in A_n)\}
A1×A2×⋯×An={(a1,a2,…,an)∣∀i∈{1,2,…,n}(ai∈An)}
Set Operations:
Operation | CHN | Denote | i.e. |
---|---|---|---|
Union | 并集 | A ∪ B A \cup B A∪B | { x ∣ x ∈ A ∨ x ∈ B } \{x \, \vert \, x \in A \lor x \in B\} {x∣x∈A∨x∈B} |
Intersection | 交集 | A ∩ B A \cap B A∩B | { x ∣ x ∈ A ∧ x ∈ B } \{x \, \vert \, x \in A \land x \in B\} {x∣x∈A∧x∈B} |
Complement | 补集 | A ‾ \overline{A} A | { x ∈ U ∣ x ∉ A } \{x \in U \, \vert \, x \notin A\} {x∈U∣x∈/A} |
Difference | 差集 | A − B A ∖ B A - B \\ A \setminus B A−BA∖B | { x ∣ x ∈ A ∧ x ∉ B } \{x \, \vert \, x \in A \land x \notin B\} {x∣x∈A∧x∈/B} |
Remark:
A
−
B
=
A
∩
B
‾
A-B=A \cap \overline{B}
A−B=A∩B
A
∩
B
=
∅
⟺
A
A \cap B=\varnothing \iff A
A∩B=∅⟺A and
B
B
B are disjoint
Principle of Inclusion–Exclusion(容斥原理):
∣
A
∪
B
∣
=
∣
A
∣
+
∣
B
∣
−
∣
A
∩
B
∣
|A \cup B|=|A|+|B|-|A \cap B|
∣A∪B∣=∣A∣+∣B∣−∣A∩B∣
Symmetric difference(对称差):
A
⊕
B
=
(
A
−
B
)
∪
(
B
−
A
)
=
(
A
∪
B
)
−
(
A
∩
B
)
A \oplus B=(A-B) \cup (B-A)=(A \cup B)-(A \cap B)
A⊕B=(A−B)∪(B−A)=(A∪B)−(A∩B)
Set Identities:
Identity | ENG | CHN |
---|---|---|
A ∪ ∅ = A A ∩ U = A A \cup \varnothing = A \\ A \cap U =A A∪∅=AA∩U=A | Identity Laws | 同一律 |
A ∪ U = U A ∩ ∅ = ∅ A \cup U = U \\ A \cap \varnothing = \varnothing A∪U=UA∩∅=∅ | Domination Laws | 支配律 |
A ∪ A = A A ∩ A = A A \cup A = A \\ A \cap A = A A∪A=AA∩A=A | Idempotent Laws | 幂等律 |
( A ‾ ) ‾ = A \overline{(\overline{A})}=A (A)=A | Complementation Law | 双重互补律 |
A ∪ B = B ∪ A A ∩ B = B ∩ A A \cup B = B \cup A \\ A \cap B = B \cap A A∪B=B∪AA∩B=B∩A | Comutative Laws | 交换律 |
( A ∪ B ) ∪ C = A ∪ ( B ∪ C ) ( A ∩ B ) ∩ C = A ∩ ( B ∩ C ) (A \cup B) \cup C = A \cup (B \cup C) \\ (A \cap B) \cap C = A \cap (B \cap C) (A∪B)∪C=A∪(B∪C)(A∩B)∩C=A∩(B∩C) | Associative Laws | 结合律 |
A ∪ ( B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C ) A ∩ ( B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C ) A \cup (B \cap C) = (A \cup B) \cap (A \cup C) \\ A \cap (B \cup C) = (A \cap B) \cup (A \cap C) A∪(B∩C)=(A∪B)∩(A∪C)A∩(B∪C)=(A∩B)∪(A∩C) | Distributive Laws | 分配律 |
A ∩ B ‾ = A ‾ ∪ B ‾ A ∪ B ‾ = A ‾ ∩ B ‾ \overline{A \cap B} = \overline{A} \cup \overline{B} \\ \overline{A \cup B} = \overline{A} \cap \overline{B} A∩B=A∪BA∪B=A∩B | De Morgan’s Laws | 德摩根定律 |
A ∪ ( A ∩ B ) = A A ∩ ( A ∪ B ) = A A \cup (A \cap B) = A \\ A \cap (A \cup B) = A A∪(A∩B)=AA∩(A∪B)=A | Absorption Laws | 吸收律 |
A ∪ A ‾ = U A ∩ A ‾ = ∅ A \cup \overline{A} = U \\ A \cap \overline{A} = \varnothing A∪A=UA∩A=∅ | Complement Laws | 互补律 |
Functions:
Let A , B ≠ ∅ A,B \ne \varnothing A,B=∅, we define a mapping f f f from A A A to B B B: f : A ↦ B f:A \mapsto B f:A↦B i.e. ∀ a ( a ∈ A → ∃ ! b ( b ∈ B ∧ f ( a ) = b ) ) \forall a(a \in A \to \exist !b(b \in B \land f(a)=b)) ∀a(a∈A→∃!b(b∈B∧f(a)=b))
Denote | ENG | CHN |
---|---|---|
A A A | domain | 定义域 |
B B B | codomain | 上域 |
f ( A ) f(A) f(A) | range | 值域 |
b b b | image | 像 |
a a a | preimage | 原像 |
Remark: f ( A ) = { f ( x ) ∣ ∀ x ∈ A } ⊆ B f(A)=\{f(x) \, \vert \, \forall x \in A\} \subseteq B f(A)={f(x)∣∀x∈A}⊆B
ENG | CHN | Denote |
---|---|---|
Injective/ One-to-one | 单射 | ∀ a ∈ A ∀ b ∈ A ( f ( a ) = f ( b ) → a = b ) ⟺ ∀ a ∈ A ∀ b ∈ A ( a ≠ b → f ( a ) ≠ f ( b ) ) \forall a \in A \ \forall b \in A(f(a)=f(b) \to a=b) \\ \iff \forall a \in A \ \forall b \in A(a \ne b \to f(a) \ne f(b)) ∀a∈A ∀b∈A(f(a)=f(b)→a=b)⟺∀a∈A ∀b∈A(a=b→f(a)=f(b)) |
Surjective/ Onto | 满射 | ∀ b ∈ B ∃ a ∈ A ( f ( a ) = b ) \forall b \in B \ \exist a \in A(f(a)=b) ∀b∈B ∃a∈A(f(a)=b) |
Bijective/ One-to-one correspondent | 双射 | both injective and surjective |
(strictly) Increasing | (严格)单调递增 | ∀ x ∈ D ∀ y ∈ D ( x < y → f ( x ) ≤ f ( y ) ) ∀ x ∈ D ∀ y ∈ D ( x < y → f ( x ) < f ( y ) ) \forall x \in D \ \forall y \in D(x < y \to f(x) \leq f(y)) \\ \forall x \in D \ \forall y \in D(x < y \to f(x) < f(y)) ∀x∈D ∀y∈D(x<y→f(x)≤f(y))∀x∈D ∀y∈D(x<y→f(x)<f(y)) |
(strictly) Decreasing | (严格)单调递减 | ∀ x ∈ D ∀ y ∈ D ( x < y → f ( x ) ≥ f ( y ) ) ∀ x ∈ D ∀ y ∈ D ( x < y → f ( x ) > f ( y ) ) \forall x \in D \ \forall y \in D(x < y \to f(x) \ge f(y)) \\ \forall x \in D \ \forall y \in D(x < y \to f(x) > f(y)) ∀x∈D ∀y∈D(x<y→f(x)≥f(y))∀x∈D ∀y∈D(x<y→f(x)>f(y)) |
Inverse function | 反函数 | ∀ y ∈ B , ∃ ! x ∈ A s . t . f ( x ) = y ⟺ f − 1 ( y ) = x \forall y \in B , \exist !x \in A \ \mathrm{s.t.} f(x)=y \\ \iff f^{-1}(y)=x ∀y∈B,∃!x∈A s.t.f(x)=y⟺f−1(y)=x |
Remark:
f
:
A
↦
B
f:A \mapsto B
f:A↦B is a bijection
⟹
∣
A
∣
=
∣
B
∣
\Longrightarrow \vert A \vert = \vert B \vert
⟹∣A∣=∣B∣
Addition of Functions:
(
f
+
g
)
(
x
)
=
f
(
x
)
+
g
(
x
)
(f+g)(x)=f(x)+g(x)
(f+g)(x)=f(x)+g(x)
Mutiplication of Functions:
(
f
⋅
g
)
(
x
)
=
f
(
x
)
⋅
g
(
x
)
(f \cdot g)(x)=f(x) \cdot g(x)
(f⋅g)(x)=f(x)⋅g(x)
Composition of Functions:
(
f
∘
g
)
(
x
)
=
f
(
g
(
x
)
)
(f \circ g)(x)=f(g(x))
(f∘g)(x)=f(g(x))
Useful properties of Floor Function
f
(
x
)
=
⌊
x
⌋
f(x)=\lfloor x \rfloor
f(x)=⌊x⌋ and Ceiling Function
g
(
x
)
=
⌈
x
⌉
g(x)=\lceil x \rceil
g(x)=⌈x⌉:
⌊
−
x
⌋
=
−
⌈
x
⌉
\lfloor -x \rfloor =- \lceil x \rceil
⌊−x⌋=−⌈x⌉ ,
⌈
−
x
⌉
=
−
⌊
x
⌋
\lceil -x \rceil =- \lfloor x \rfloor
⌈−x⌉=−⌊x⌋
x
−
1
<
⌊
x
⌋
≤
x
≤
⌈
x
⌉
<
x
+
1
x-1<\lfloor x \rfloor \leq x \leq \lceil x \rceil <x+1
x−1<⌊x⌋≤x≤⌈x⌉<x+1
Useful Summation Formulea:
Sum | Closed Form |
---|---|
∑ k = 0 n a r k , r ≠ 0 , 1 \sum\limits_{k=0}^{n}{ar^k},r \ne 0,1 k=0∑nark,r=0,1 | a ( 1 − r n + 1 ) 1 − r \dfrac{a(1-r^{n+1})}{1-r} 1−ra(1−rn+1) |
∑ k = 1 n k \sum\limits_{k=1}^{n}{k} k=1∑nk | n ( n + 1 ) 2 \dfrac{n(n+1)}{2} 2n(n+1) |
∑ k = 1 n k 2 \sum\limits_{k=1}^{n}{k^2} k=1∑nk2 | n ( n + 1 ) ( 2 n + 1 ) 6 \dfrac{n(n+1)(2n+1)}{6} 6n(n+1)(2n+1) |
∑ k = 1 n k 3 \sum\limits_{k=1}^{n}{k^3} k=1∑nk3 | n 2 ( n + 1 ) 2 4 \dfrac{n^2(n+1)^2}{4} 4n2(n+1)2 |
∑ k = 0 ∞ x k , ∣ x ∣ < 1 \sum\limits_{k=0}^{\infty}{x^k},\vert x \vert <1 k=0∑∞xk,∣x∣<1 | 1 1 − x \dfrac{1}{1-x} 1−x1 |
∑ k = 1 ∞ k x k − 1 , ∣ x ∣ < 1 \sum\limits_{k=1}^{\infty}{kx^{k-1}},\vert x \vert <1 k=1∑∞kxk−1,∣x∣<1 | 1 ( 1 − x ) 2 \dfrac{1}{(1-x)^2} (1−x)21 |
Cardinality of infinite sets:
Definition: infinite set
A
A
A is countable
⟺
∣
A
∣
=
∣
Z
+
∣
=
ℵ
0
\iff |A|=|\mathbb{Z}^+|=\aleph_0
⟺∣A∣=∣Z+∣=ℵ0
Remark:
∣
Q
+
∣
=
∣
Z
+
×
Z
+
∣
=
ℵ
0
⟸
∣
Q
+
∣
≤
∣
Z
+
×
Z
+
∣
=
∣
Z
+
∣
≤
∣
Q
+
∣
|\mathbb{Q}^+|=|\mathbb{Z}^+\times\mathbb{Z}^+|=\aleph_0 \Longleftarrow|\mathbb{Q}^+|\leq|\mathbb{Z}^+\times\mathbb{Z}^+|=|\mathbb{Z}^+|\leq|\mathbb{Q}^+|
∣Q+∣=∣Z+×Z+∣=ℵ0⟸∣Q+∣≤∣Z+×Z+∣=∣Z+∣≤∣Q+∣
∣
R
∣
=
∣
(
0
,
1
)
∣
=
ℵ
1
⟸
f
:
(
−
π
2
,
π
2
)
↦
R
,
f
(
x
)
=
tan
(
x
π
+
1
2
)
|\mathbb{R}|=|(0,1)|=\aleph_1\Longleftarrow f:(-\frac{\pi}{2},\frac{\pi}{2}) \mapsto \mathbb{R},f(x)=\tan(\frac{x}{\pi}+\frac12)
∣R∣=∣(0,1)∣=ℵ1⟸f:(−2π,2π)↦R,f(x)=tan(πx+21)
∣
[
0
,
1
]
∣
=
∣
(
0
,
1
)
∣
=
ℵ
1
⟸
∣
(
0
,
1
)
∣
≤
∣
[
0
,
1
]
∣
=
∣
[
1
4
,
3
4
]
∣
≤
∣
(
0
,
1
)
∣
|[0,1]|=|(0,1)|=\aleph_1 \Longleftarrow |(0,1)|\leq|[0,1]|=|[\frac14,\frac34]|\leq|(0,1)|
∣[0,1]∣=∣(0,1)∣=ℵ1⟸∣(0,1)∣≤∣[0,1]∣=∣[41,43]∣≤∣(0,1)∣
Cantor’s Theorem(康托尔定理) and proof:
∣
P
(
A
)
∣
>
∣
A
∣
|\mathcal{P}(A)|>|A|
∣P(A)∣>∣A∣
Let
f
:
A
↦
P
(
A
)
f:A \mapsto \mathcal{P}(A)
f:A↦P(A) be an arbitary function.
Consider
B
=
{
x
∈
A
:
x
∉
f
(
x
)
}
B=\{x \in A : x \notin f(x)\}
B={x∈A:x∈/f(x)}.
Assume that there exists
y
∈
A
y \in A
y∈A so that
f
(
y
)
=
B
f(y)=B
f(y)=B.
If
y
∈
B
y \in B
y∈B then
y
∈
f
(
y
)
y \in f(y)
y∈f(y), conflicting with the definition of
B
B
B.
If
y
∉
B
y \notin B
y∈/B then
y
∉
f
(
y
)
y \notin f(y)
y∈/f(y), so we have
y
∈
B
y \in B
y∈B conflicting with
y
∉
B
y \notin B
y∈/B.
Thus there is no such
y
y
y, showing
B
∈
P
(
A
)
B \in \mathcal{P}(A)
B∈P(A) does not have preimage in
A
A
A.
Hence,
f
f
f is not a surjection.
Q
.
E
.
D
.
\mathrm{Q.E.D.}
Q.E.D.
Schrőder-Bernstein Theorem(伯恩斯坦定理):
∣
A
∣
≤
∣
B
∣
∧
∣
B
∣
≤
∣
A
∣
⟺
∣
A
∣
=
∣
B
∣
|A|\leq|B|\land|B|\leq|A| \Longleftrightarrow |A|=|B|
∣A∣≤∣B∣∧∣B∣≤∣A∣⟺∣A∣=∣B∣
The Continuum Hypothesis(连续统假设):
∄
a
s
.
t
.
ℵ
0
<
a
<
ℵ
1
\not\exists a \ \mathrm{s.t.} \ \aleph_0<a<\aleph_1
∃a s.t. ℵ0<a<ℵ1
6. Counting
The Generalized Pigeonhole Principle(鸽巢原理/抽屉原理):
If
N
N
N objects are placed into
k
k
k boxes, then there is at least one box containing at least
⌈
N
k
⌉
\lceil \frac{N}{k} \rceil
⌈kN⌉ objects.
Permutations and Combinations:
P
(
n
,
r
)
=
n
(
n
−
1
)
(
n
−
2
)
⋯
(
n
−
r
+
1
)
=
n
!
(
n
−
r
)
!
P(n,r)=n(n-1)(n-2)\cdots(n-r+1)=\dfrac{n!}{(n-r)!}
P(n,r)=n(n−1)(n−2)⋯(n−r+1)=(n−r)!n!
C
(
n
,
r
)
=
(
n
r
)
=
P
(
n
,
r
)
r
!
=
n
(
n
−
1
)
(
n
−
2
)
⋯
(
n
−
r
+
1
)
r
!
=
n
!
r
!
(
n
−
r
)
!
C(n,r)=\dbinom{n}{r}=\dfrac{P(n,r)}{r!}=\dfrac{n(n-1)(n-2)\cdots(n-r+1)}{r!}=\dfrac{n!}{r!(n-r)!}
C(n,r)=(rn)=r!P(n,r)=r!n(n−1)(n−2)⋯(n−r+1)=r!(n−r)!n!
Remark:
(
n
r
)
=
(
n
n
−
r
)
\dbinom{n}{r}=\dbinom{n}{n-r}
(rn)=(n−rn)
The Binomial Theorem(二项式定理):
(
x
+
y
)
n
=
∑
k
=
0
n
(
n
k
)
x
n
−
k
y
k
(x+y)^n=\sum\limits_{k=0}^{n}{\dbinom{n}{k}x^{n-k}y^k}
(x+y)n=k=0∑n(kn)xn−kyk
∑
k
=
0
n
(
n
k
)
=
2
n
⟸
x
=
y
=
1
\sum\limits_{k=0}^{n}{\dbinom{n}{k}}=2^n \Longleftarrow x=y=1
k=0∑n(kn)=2n⟸x=y=1
∑
k
=
0
n
(
−
1
)
k
(
n
k
)
=
0
⟸
x
=
−
y
=
1
\sum\limits_{k=0}^{n}{(-1)^k\dbinom{n}{k}}=0 \Longleftarrow x=-y=1
k=0∑n(−1)k(kn)=0⟸x=−y=1
∑
k
=
0
n
2
k
(
n
k
)
=
3
n
⟸
x
+
1
=
y
=
2
\sum\limits_{k=0}^{n}{2^k\dbinom{n}{k}}=3^n \Longleftarrow x+1=y=2
k=0∑n2k(kn)=3n⟸x+1=y=2
Pascal’s Identity:
(
n
+
1
k
)
=
(
n
k
)
+
(
n
k
−
1
)
\dbinom{n+1}{k}=\dbinom{n}{k}+\dbinom{n}{k-1}
(kn+1)=(kn)+(k−1n)
Vandermonde’s Identity and proof:
(
m
+
n
r
)
=
∑
k
=
0
r
(
m
r
−
k
)
(
n
k
)
\dbinom{m+n}{r}=\sum\limits_{k=0}^r{\dbinom{m}{r-k}\dbinom{n}{k}}
(rm+n)=k=0∑r(r−km)(kn)
(
x
+
y
)
m
+
n
=
⋯
+
(
m
+
n
r
)
x
m
+
n
−
r
y
r
+
⋯
(x+y)^{m+n}=\cdots+\dbinom{m+n}{r}x^{m+n-r}y^r+\cdots
(x+y)m+n=⋯+(rm+n)xm+n−ryr+⋯
(
x
+
y
)
m
(
x
+
y
)
n
=
⋯
+
(
∑
k
=
0
r
(
m
r
−
k
)
x
m
−
r
+
k
y
r
−
k
)
(
∑
k
=
0
n
(
n
k
)
x
n
−
k
y
k
)
+
⋯
=
⋯
+
∑
k
=
0
r
(
(
m
r
−
k
)
x
m
−
r
+
k
y
r
−
k
⋅
(
n
k
)
x
n
−
k
y
k
)
+
⋯
=
⋯
+
∑
k
=
0
r
(
m
r
−
k
)
(
n
k
)
x
m
+
n
−
r
y
r
+
⋯
\begin{aligned}(x+y)^m(x+y)^n&=\cdots+\left(\sum\limits_{k=0}^{r}{\dbinom{m}{r-k}x^{m-r+k}y^{r-k}}\right)\left(\sum\limits_{k=0}^{n}{\dbinom{n}{k}x^{n-k}y^k}\right)+\cdots \\ &=\cdots+\sum\limits_{k=0}^{r}{\left(\dbinom{m}{r-k}x^{m-r+k}y^{r-k}\cdot\dbinom{n}{k}x^{n-k}y^k\right)}+\cdots \\ &=\cdots+\sum\limits_{k=0}^{r}{\dbinom{m}{r-k}\dbinom{n}{k}x^{m+n-r}y^r}+\cdots\end{aligned}
(x+y)m(x+y)n=⋯+(k=0∑r(r−km)xm−r+kyr−k)(k=0∑n(kn)xn−kyk)+⋯=⋯+k=0∑r((r−km)xm−r+kyr−k⋅(kn)xn−kyk)+⋯=⋯+k=0∑r(r−km)(kn)xm+n−ryr+⋯
Corollary:
(
2
n
n
)
=
∑
k
=
0
n
(
n
n
−
k
)
(
n
k
)
=
∑
k
=
0
n
(
n
k
)
2
⟸
m
=
r
=
n
\dbinom{2n}{n}=\sum\limits_{k=0}^{n}{\dbinom{n}{n-k}\dbinom{n}{k}}=\sum\limits_{k=0}^{n}{\dbinom{n}{k}^2} \Longleftarrow m=r=n
(n2n)=k=0∑n(n−kn)(kn)=k=0∑n(kn)2⟸m=r=n
Remark:
(
n
+
1
r
+
1
)
=
∑
k
=
r
n
(
k
r
)
\dbinom{n+1}{r+1}=\sum\limits_{k=r}^{n}{\dbinom{k}{r}}
(r+1n+1)=k=r∑n(rk)
(
n
+
1
r
+
1
)
=
(
n
r
+
1
)
+
(
n
r
)
=
(
n
−
1
r
+
1
)
+
(
n
−
1
r
)
+
(
n
r
)
=
⋯
=
(
r
+
1
r
+
1
)
+
∑
k
=
r
+
1
n
(
k
r
)
=
(
r
r
)
+
∑
k
=
r
+
1
n
(
k
r
)
=
∑
k
=
r
n
(
k
r
)
\begin{aligned}\dbinom{n+1}{r+1}&=\dbinom{n}{r+1}+\dbinom{n}{r}=\dbinom{n-1}{r+1}+\dbinom{n-1}{r}+\dbinom{n}{r}=\cdots \\ &=\dbinom{r+1}{r+1}+\sum\limits_{k=r+1}^{n}{\dbinom{k}{r}}=\dbinom{r}{r}+\sum\limits_{k=r+1}^{n}{\dbinom{k}{r}}=\sum\limits_{k=r}^{n}{\dbinom{k}{r}}\end{aligned}
(r+1n+1)=(r+1n)+(rn)=(r+1n−1)+(rn−1)+(rn)=⋯=(r+1r+1)+k=r+1∑n(rk)=(rr)+k=r+1∑n(rk)=k=r∑n(rk)
Stirling Number(II):
n n n distinguishable objects into k k k indistinguishable boxes: ∑ j = 1 k S ( n , j ) = ∑ j = 1 k [ 1 j ! ∑ i = 0 j − 1 ( − 1 ) i ( j i ) ( j − i ) n ] \sum\limits_{j=1}^{k}{S(n, j)}=\sum\limits_{j=1}^{k}{\left[\dfrac{1}{j!}\sum\limits_{i=0}^{j-1}{(-1)^i\dbinom{j}{i}(j-i)^n}\right]} j=1∑kS(n,j)=j=1∑k[j!1i=0∑j−1(−1)i(ij)(j−i)n]
8. Advanced Counting Techniques
Solving Linear Recurrence Relations:
a
n
=
c
1
a
n
−
1
+
c
2
a
n
−
2
+
⋯
+
c
k
a
n
−
k
+
F
(
n
)
a_n=c_1a_{n-1}+c_2a_{n-2}+\cdots+c_ka_{n-k}+F(n)
an=c1an−1+c2an−2+⋯+ckan−k+F(n),
F
(
n
)
=
(
b
t
n
t
+
b
t
−
1
n
t
−
1
+
⋯
+
b
1
n
+
b
0
)
s
n
F(n)=(b_tn^t+b_{t-1}n^{t-1}+\cdots+b_1n+b_0)s^n
F(n)=(btnt+bt−1nt−1+⋯+b1n+b0)sn.
Let the form of general solutions be
a
n
(
p
)
+
a
n
(
h
)
a_n^{(p)}+a_n^{(h)}
an(p)+an(h)
a
n
(
h
)
a_n^{(h)}
an(h) is the solution of homogeneous equation
a
n
=
c
1
a
n
−
1
+
c
2
a
n
−
2
+
⋯
+
c
k
a
n
−
k
a_n=c_1a_{n-1}+c_2a_{n-2}+\cdots+c_ka_{n-k}
an=c1an−1+c2an−2+⋯+ckan−k
Assume that
s
s
s is a root of multiplicity
m
m
m of the equation
Then
a
n
(
p
)
a_n^{(p)}
an(p)is the form as
n
m
(
d
t
n
t
+
d
t
−
1
n
t
−
1
+
⋯
+
d
1
n
+
d
0
)
s
n
n^m(d_tn^t+d_{t-1}n^{t-1}+\cdots+d_1n+d_0)s^n
nm(dtnt+dt−1nt−1+⋯+d1n+d0)sn.
Particularly, when
s
s
s is not a root of the homogeneous equation,
m
=
0
m=0
m=0.
Now we can solve the coefficients
e
i
e_i
ei of
a
n
=
e
1
x
1
n
+
e
2
x
2
n
+
⋯
+
e
k
x
k
n
+
a
n
(
p
)
a_n=e_1x_1^n+e_2x_2^n+\cdots+e_kx_k^n+a_n^{(p)}
an=e1x1n+e2x2n+⋯+ekxkn+an(p).
If
x
i
x_i
xi is of multiplicity
l
l
l, the form is as
(
e
i
n
l
+
e
i
+
1
n
l
−
1
+
⋯
+
e
i
+
l
−
2
n
+
e
i
+
l
−
1
)
x
i
n
(e_in^l+e_{i+1}n^{l-1}+\cdots+e_{i+l-2}n+e_{i+l-1})x_i^n
(einl+ei+1nl−1+⋯+ei+l−2n+ei+l−1)xin.
Generating Functions:
G
(
x
)
=
a
0
+
a
1
x
+
a
2
x
2
+
⋯
+
a
n
x
n
+
⋯
=
∑
k
=
0
∞
a
k
x
k
G(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n+\cdots=\sum\limits_{k=0}^{\infty}{a_kx^k}
G(x)=a0+a1x+a2x2+⋯+anxn+⋯=k=0∑∞akxk
Remark:
f
(
x
)
+
g
(
x
)
=
∑
k
=
0
∞
(
a
k
+
b
k
)
x
k
f(x)+g(x)=\sum\limits_{k=0}^{\infty}{(a_k+b_k)x^k}
f(x)+g(x)=k=0∑∞(ak+bk)xk
α
⋅
f
(
x
)
=
∑
k
=
0
∞
α
⋅
a
k
x
k
\alpha \cdot f(x)=\sum\limits_{k=0}^{\infty}{\alpha \cdot a_kx^k}
α⋅f(x)=k=0∑∞α⋅akxk
x
⋅
f
′
(
x
)
=
∑
k
=
0
∞
k
⋅
a
k
x
k
x \cdot f'(x)=\sum\limits_{k=0}^{\infty}{k \cdot a_kx^k}
x⋅f′(x)=k=0∑∞k⋅akxk
f
(
α
x
)
=
∑
k
=
0
∞
α
k
⋅
a
k
x
k
f(\alpha x)=\sum\limits_{k=0}^{\infty}{\alpha^k \cdot a_kx^k}
f(αx)=k=0∑∞αk⋅akxk
f
(
x
)
g
(
x
)
=
∑
k
=
0
∞
(
∑
j
=
0
k
a
j
b
k
−
j
)
x
k
f(x)g(x)=\sum\limits_{k=0}^{\infty}{(\sum\limits_{j=0}^{k}{a_jb_{k-j}})x^k}
f(x)g(x)=k=0∑∞(j=0∑kajbk−j)xk
eg.
b
k
=
∑
i
=
0
k
a
i
b_k=\sum\limits_{i=0}^{k}{a_i}
bk=i=0∑kai
⟹
F
(
x
)
=
∑
k
=
0
∞
b
k
x
k
=
∑
k
=
0
∞
(
∑
i
=
0
k
a
i
⋅
1
)
x
k
=
G
(
x
)
⋅
1
1
−
x
\Longrightarrow F(x)=\sum\limits_{k=0}^{\infty}{b_kx^k}=\sum\limits_{k=0}^{\infty}{\left(\sum\limits_{i=0}^{k}{a_i \cdot 1}\right)x^k}=G(x) \cdot \dfrac{1}{1-x}
⟹F(x)=k=0∑∞bkxk=k=0∑∞(i=0∑kai⋅1)xk=G(x)⋅1−x1
a
k
=
k
2
a_k=k^2
ak=k2
⟹
G
(
x
)
=
∑
k
=
0
∞
k
2
x
k
=
x
(
∑
k
=
0
∞
k
x
k
)
′
=
x
[
x
(
∑
k
=
0
∞
x
k
)
′
]
′
=
x
[
x
(
1
1
−
x
)
′
]
′
=
x
(
1
+
x
)
(
1
−
x
)
3
\Longrightarrow G(x)=\sum\limits_{k=0}^{\infty}{k^2x^k}=x\left(\sum\limits_{k=0}^{\infty}{kx^k}\right)'=x\left[x\left(\sum\limits_{k=0}^{\infty}{x^k}\right)'\right]'=x\left[x\left(\dfrac{1}{1-x}\right)'\right]'=\dfrac{x(1+x)}{(1-x)^3}
⟹G(x)=k=0∑∞k2xk=x(k=0∑∞kxk)′=x[x(k=0∑∞xk)′]′=x[x(1−x1)′]′=(1−x)3x(1+x)
a
k
=
∑
i
=
0
k
i
2
a_k=\sum\limits_{i=0}^{k}{i^2}
ak=i=0∑ki2
⟹
G
(
x
)
=
∑
k
=
0
∞
(
∑
i
=
0
k
i
2
⋅
1
)
x
k
=
x
(
1
+
x
)
(
1
−
x
)
3
⋅
1
1
−
x
=
x
(
1
+
x
)
(
1
−
x
)
4
\Longrightarrow G(x)=\sum\limits_{k=0}^{\infty}{(\sum\limits_{i=0}^{k}{i^2 \cdot 1})x^k}=\dfrac{x(1+x)}{(1-x)^3} \cdot \dfrac{1}{1-x}=\dfrac{x(1+x)}{(1-x)^4}
⟹G(x)=k=0∑∞(i=0∑ki2⋅1)xk=(1−x)3x(1+x)⋅1−x1=(1−x)4x(1+x)
f
(
x
)
=
1
1
−
4
x
2
=
1
(
1
−
2
x
)
(
1
+
2
x
)
=
1
2
(
1
1
−
2
x
+
1
1
+
2
x
)
=
∑
k
=
0
∞
a
k
x
k
f(x)=\dfrac{1}{1-4x^2}=\dfrac{1}{(1-2x)(1+2x)}=\dfrac12\left(\dfrac{1}{1-2x}+\dfrac{1}{1+2x}\right)=\sum\limits_{k=0}^{\infty}{a_kx^k}
f(x)=1−4x21=(1−2x)(1+2x)1=21(1−2x1+1+2x1)=k=0∑∞akxk
⟹
a
k
=
2
k
+
(
−
2
)
k
2
\Longrightarrow a_k=\dfrac{2^k+(-2)^k}{2}
⟹ak=22k+(−2)k
The Extended Binomial Therom:
(
1
+
x
)
u
=
∑
k
=
0
∞
(
u
k
)
x
k
,
∣
x
∣
<
1
,
u
∈
R
(1+x)^u=\sum\limits_{k=0}^{\infty}{\dbinom{u}{k}x^k},|x|<1,u \in \mathbb{R}
(1+x)u=k=0∑∞(ku)xk,∣x∣<1,u∈R
Collary:
(
1
+
x
)
−
n
=
∑
k
=
0
∞
(
−
n
k
)
x
k
=
∑
k
=
0
∞
(
−
1
)
k
(
n
+
k
−
1
k
)
x
k
(1+x)^{-n}=\sum\limits_{k=0}^{\infty}{\dbinom{-n}{k}x^k}=\sum\limits_{k=0}^{\infty}{(-1)^k\dbinom{n+k-1}{k}x^k}
(1+x)−n=k=0∑∞(k−n)xk=k=0∑∞(−1)k(kn+k−1)xk
(
1
−
x
)
−
n
=
∑
k
=
0
∞
(
−
n
k
)
(
−
x
)
k
=
∑
k
=
0
∞
(
n
+
k
−
1
k
)
x
k
(1-x)^{-n}=\sum\limits_{k=0}^{\infty}{\dbinom{-n}{k}(-x)^k}=\sum\limits_{k=0}^{\infty}{\dbinom{n+k-1}{k}x^k}
(1−x)−n=k=0∑∞(k−n)(−x)k=k=0∑∞(kn+k−1)xk
Generating Functions of Common Sequences:
Sequence | Generating Function |
---|---|
1 1 1 | 1 1 − x \dfrac{1}{1-x} 1−x1 |
α k \alpha^k αk | 1 1 − α x \dfrac{1}{1-\alpha x} 1−αx1 |
k + 1 k+1 k+1 | 1 ( 1 − x ) 2 \dfrac{1}{(1-x)^2} (1−x)21 |
( n k ) \dbinom{n}{k} (kn) | ( 1 + x ) n (1+x)^n (1+x)n |
( n k ) α k \dbinom{n}{k} \alpha^k (kn)αk | ( 1 + α x ) n (1+\alpha x)^n (1+αx)n |
( n + k − 1 k ) \dbinom{n+k-1}{k} (kn+k−1) | ( 1 − x ) − n (1-x)^{-n} (1−x)−n |
( − 1 ) k ( n + k − 1 k ) (-1)^k\dbinom{n+k-1}{k} (−1)k(kn+k−1) | ( 1 + x ) − n (1+x)^{-n} (1+x)−n |
1 k ! \dfrac{1}{k!} k!1 | e x e^x ex |
( − 1 ) k + 1 k ! \dfrac{(-1)^{k+1}}{k!} k!(−1)k+1 | ln ( 1 + x ) \ln(1+x) ln(1+x) |
9. Relations
Definition: A binary relation
R
R
R from set
A
A
A to set
B
B
B is a subset of
A
×
B
A \times B
A×B.
Remark:
R
=
{
(
a
,
b
)
∣
a
∈
A
∧
b
∈
B
∧
a
R
b
}
⊆
A
×
B
R=\{(a,b) \, | \, a \in A \land b \in B \land aRb\} \subseteq A \times B
R={(a,b)∣a∈A∧b∈B∧aRb}⊆A×B
Definition: A relation on set
A
A
A is a binary relation from set
A
A
A to set
A
A
A.
eg. How many binary relations are there on a set
A
A
A with
n
n
n elements?
∣
A
∣
=
n
⟹
∣
A
×
A
∣
=
n
⋅
n
=
n
2
⟹
∣
R
∣
=
2
n
2
|A|=n \Longrightarrow |A \times A|=n \cdot n=n^2 \Longrightarrow |R|=2^{n^2}
∣A∣=n⟹∣A×A∣=n⋅n=n2⟹∣R∣=2n2
Connection Matrices
Let
R
R
R be a relation from
A
=
{
a
1
,
a
2
,
…
,
a
n
}
A=\{a_1, a_2, \dots , a_n\}
A={a1,a2,…,an} to
B
=
{
b
1
,
b
2
,
…
,
b
m
}
B=\{b_1, b_2, \dots , b_m\}
B={b1,b2,…,bm}.
The
n
×
m
n \times m
n×m connection matrix
M
R
=
[
m
i
j
]
M_R=[m_{ij}]
MR=[mij] for
R
R
R is defined by:
m
i
j
=
{
1
,
(
a
i
,
b
j
)
∈
R
0
,
(
a
i
,
b
j
)
∉
R
m_{ij}=\begin{cases} 1, (a_i, b_j) \in R \\ 0, (a_i, b_j) \notin R \end{cases}
mij={1,(ai,bj)∈R0,(ai,bj)∈/R
Special Properties of Binary Relations
Type | CHN | Denote |
---|---|---|
Reflexive | 自反性 | ∀ x ( x ∈ A → ( x , x ) ∈ R ) \forall x(x \in A \to (x,x) \in R) ∀x(x∈A→(x,x)∈R) |
Irreflexive | 非自反性 | ∀ x ( x ∈ A → ( x , x ) ∉ R ) \forall x(x \in A \to (x,x) \notin R) ∀x(x∈A→(x,x)∈/R) |
Symmetric | 对称性 | ∀ x ∀ y ( ( x , y ) ∈ R → ( y , x ) ∈ R ) \forall x \forall y((x,y) \in R \to (y,x) \in R) ∀x∀y((x,y)∈R→(y,x)∈R) |
Antisymmetric | 反对称性 |
∀
x
∀
y
(
(
x
,
y
)
∈
R
∧
(
y
,
x
)
∈
R
→
x
=
y
)
\forall x \forall y((x,y) \in R \land (y,x) \in R \to x=y)
∀x∀y((x,y)∈R∧(y,x)∈R→x=y) ∀ x ∀ y ( ( x , y ) ∈ R ∧ x ≠ y → ( y , x ) ∉ R ) \forall x \forall y((x,y) \in R \land x \neq y \to (y,x) \notin R) ∀x∀y((x,y)∈R∧x=y→(y,x)∈/R) |
Asymmetric | 非对称性 | ∀ x ∀ y ( x ≠ y → ( x , y ) ∈ R ∧ ( y , x ) ∉ R ∨ ( x , y ) ∉ R ∧ ( y , x ) ∈ R ) \forall x \forall y(x \neq y \to (x,y) \in R \land (y,x) \notin R \lor (x,y) \notin R \land (y,x) \in R) ∀x∀y(x=y→(x,y)∈R∧(y,x)∈/R∨(x,y)∈/R∧(y,x)∈R) |
Transitive | 传递性 | ∀ x ∀ y ∀ z ( ( x , y ) ∈ R ∧ ( y , z ) ∈ R → ( x , z ) ∈ R ) \forall x \forall y \forall z((x,y) \in R \land (y,z) \in R \to (x,z) \in R) ∀x∀y∀z((x,y)∈R∧(y,z)∈R→(x,z)∈R) |
Remark:
(
m
i
j
∧
m
j
k
)
‾
∨
m
i
k
=
1
\overline{(m_{ij} \land m_{jk})} \lor m_{ik}=1
(mij∧mjk)∨mik=1
eg.
How many relations on a set with
n
n
n elements that are reflexive?
2
n
2
−
n
2^{n^2-n}
2n2−n
How many relations on a set with
n
n
n elements that are symmetric?
2
n
⋅
2
n
2
−
n
2
=
2
n
2
+
n
2
2^n \cdot 2^\frac{n^2-n}{2}=2^\frac{n^2+n}{2}
2n⋅22n2−n=22n2+n
How many relations on a set with
n
n
n elements that are antisymmetric?
2
n
⋅
3
n
2
−
n
2
2^n \cdot 3^\frac{n^2-n}{2}
2n⋅32n2−n
How many relations on a set with
n
n
n elements that are reflexive and symmetric?
2
n
2
−
n
2
2^\frac{n^2-n}{2}
22n2−n
How many relations on a set with
n
n
n elements that are transitive?
∑
j
=
1
n
S
(
n
,
j
)
\sum\limits_{j=1}^{n}{S(n,j)}
j=1∑nS(n,j)
Combining Relations
Let A = { a 1 , a 2 , … , a n } A=\{a_1, a_2, \dots , a_n\} A={a1,a2,…,an}, B = { b 1 , b 2 , … , b m } B=\{b_1, b_2, \dots , b_m\} B={b1,b2,…,bm}, M R 1 = [ c i j ] M_{R_1}=[c_{ij}] MR1=[cij], M R 2 = [ d i j ] M_{R_2}=[d_{ij}] MR2=[dij].
Operation | Denote |
---|---|
R 1 ∪ R 2 R_1 \cup R_2 R1∪R2 | M R 1 ∪ R 2 = [ c i j ∨ d i j ] M_{R_1 \cup R_2}=[c_{ij} \lor d_{ij}] MR1∪R2=[cij∨dij] |
R 1 ∩ R 2 R_1 \cap R_2 R1∩R2 | M R 1 ∩ R 2 = [ c i j ∧ d i j ] M_{R_1 \cap R_2}=[c_{ij} \land d_{ij}] MR1∩R2=[cij∧dij] |
R 1 ‾ \overline{R_1} R1 | M R 1 ‾ = [ c i j ‾ ] M_{\overline{R_1}}=[\overline{c_{ij}}] MR1=[cij] |
R
1
−
R
2
R_1-R_2
R1−R2 R 1 ∩ R 2 ‾ R_1 \cap \overline{R_2} R1∩R2 | M R 1 − R 2 = M R 1 ∩ R 2 ‾ = [ c i j ∧ d i j ‾ ] M_{R_1-R_2}=M_{R_1 \cap \overline{R_2}}=[c_{ij} \land \overline{d_{ij}}] MR1−R2=MR1∩R2=[cij∧dij] |
Let
R
=
{
(
a
,
b
)
∣
a
∈
A
∧
b
∈
B
∧
a
R
b
}
R=\{(a,b) \, | \, a \in A \land b \in B \land aRb\}
R={(a,b)∣a∈A∧b∈B∧aRb},
S
=
{
(
b
,
c
)
∣
b
∈
B
∧
c
∈
C
∧
b
S
c
}
S=\{(b,c) \, | \, b \in B \land c \in C \land bSc\}
S={(b,c)∣b∈B∧c∈C∧bSc}.
The composition of
R
R
R and
S
S
S:
S
∘
R
=
{
(
a
,
c
)
∣
a
∈
A
∧
c
∈
C
∧
∃
b
∈
B
(
a
R
b
∧
b
S
c
)
}
S \circ R=\{(a,c) \, | \, a \in A \land c \in C \land \exists b \in B(aRb \land bSc)\}
S∘R={(a,c)∣a∈A∧c∈C∧∃b∈B(aRb∧bSc)}
Remark:
R
n
=
R
n
−
1
∘
R
R^n=R^{n-1} \circ R
Rn=Rn−1∘R
Theroem: The relation R on a set A is transitive
⟺
R
n
⊆
R
\iff R^n \subseteq R
⟺Rn⊆R
Let
R
=
{
(
a
,
b
)
∣
a
∈
A
∧
b
∈
B
∧
a
R
b
}
R=\{(a,b) \, | \, a \in A \land b \in B \land aRb\}
R={(a,b)∣a∈A∧b∈B∧aRb}.
The inverse relation of
R
R
R:
R
c
=
R
−
1
=
{
(
b
,
a
)
∣
a
∈
A
∧
b
∈
B
∧
a
R
b
}
R^c=R^{-1}=\{(b,a) \, | \, a \in A \land b \in B \land aRb\}
Rc=R−1={(b,a)∣a∈A∧b∈B∧aRb}
Remark:
M
R
−
1
=
(
M
R
)
T
M_{R^{-1}}=(M_R)^T
MR−1=(MR)T
Properties of Relation Operations
(
R
∪
S
)
−
1
=
R
−
1
∪
S
−
1
(R \cup S)^{-1}=R^{-1} \cup S^{-1}
(R∪S)−1=R−1∪S−1
(
R
∩
S
)
−
1
=
R
−
1
∩
S
−
1
(R \cap S)^{-1}=R^{-1} \cap S^{-1}
(R∩S)−1=R−1∩S−1
(
R
‾
)
−
1
=
R
−
1
‾
(\overline{R})^{-1}=\overline{R^{-1}}
(R)−1=R−1
(
R
−
S
)
−
1
=
R
−
1
−
S
−
1
(R-S)^{-1}=R^{-1}-S^{-1}
(R−S)−1=R−1−S−1
(
A
×
B
)
−
1
=
B
×
A
(A \times B)^{-1}=B \times A
(A×B)−1=B×A
R
‾
=
A
×
B
−
R
\overline{R}=A \times B -R
R=A×B−R
(
S
∘
T
)
−
1
=
T
−
1
∘
S
−
1
(S \circ T)^{-1}=T^{-1} \circ S^{-1}
(S∘T)−1=T−1∘S−1
(
R
∘
T
)
∘
P
=
R
∘
(
T
∘
P
)
(R \circ T) \circ P=R \circ (T \circ P)
(R∘T)∘P=R∘(T∘P)
(
R
∪
S
)
∘
T
=
(
R
∘
T
)
∪
(
S
∘
T
)
(R \cup S) \circ T=(R \circ T) \cup (S \circ T)
(R∪S)∘T=(R∘T)∪(S∘T)
Closures of Relations
Closure | CHN | Denote |
---|---|---|
Reflexive Closure | 自反闭包 | r ( R ) = R ∪ I A r(R)=R \cup I_A r(R)=R∪IA |
Symmetric Closure | 对称闭包 | s ( R ) = R ∪ R − 1 s(R)=R \cup R^{-1} s(R)=R∪R−1 |
Transitive Closure | 传递闭包 | t ( R ) = R ∗ t(R)=R^* t(R)=R∗ |
The diagonal relation on
A
A
A:
I
A
=
{
(
x
,
x
)
∣
x
∈
A
}
I_A=\{(x,x) \, | \, x \in A\}
IA={(x,x)∣x∈A}
The connectivity relation on
A
A
A:
R
∗
=
⋃
n
=
1
∞
R
n
R^*=\bigcup\limits_{n=1}^{\infty}{R^n}
R∗=n=1⋃∞Rn
Collary:
∣
A
∣
=
n
⟹
t
(
R
)
=
R
∪
R
2
∪
⋯
∪
R
n
|A|=n \Longrightarrow t(R)=R \cup R^2 \cup \cdots \cup R^n
∣A∣=n⟹t(R)=R∪R2∪⋯∪Rn
Equivalence Relations and Partitions
Definition:
A relation
R
R
R on set
A
A
A is an equivalence relation iff
R
R
R is reflexive, symmetric and transitive.
The equivalence class of
x
∈
A
x \in A
x∈A via equivalence relation
R
R
R is
[
x
]
R
[x]_R
[x]R, or
[
x
]
[x]
[x] for short.
a
a
a and
b
b
b of set
A
A
A are equivalent by equivalence relation
R
R
R
⟺
a
∼
b
\iff a \sim b
⟺a∼b
Remark:
Congruence Modulo
m
m
m:
R
=
{
(
a
,
b
)
∣
a
≡
b
(
m
o
d
m
)
,
a
,
b
∈
Z
}
R=\{(a,b) \, | \, a \equiv b \pmod{m}, a,b \in \mathbb{Z}\}
R={(a,b)∣a≡b(modm),a,b∈Z}
Congruence class Modulo
m
m
m:
[
t
]
m
=
{
t
+
k
m
∣
k
∈
Z
}
,
t
=
0
,
1
,
2
,
…
,
m
−
1
[t]_m=\{t+km \, | \, k \in \mathbb{Z}\}, t=0,1,2,\dots,m-1
[t]m={t+km∣k∈Z},t=0,1,2,…,m−1
Theroem:
Let
R
R
R be an equivalence relation on set
A
A
A.
a
R
b
⟺
[
a
]
=
[
b
]
⟺
[
a
]
∩
[
b
]
≠
∅
aRb \iff [a]=[b] \iff [a] \cap [b] \neq \varnothing
aRb⟺[a]=[b]⟺[a]∩[b]=∅
Theroem:
Let
R
1
R_1
R1 and
R
2
R_2
R2 be equivalence relations on
A
A
A.
R
1
∩
R
2
R_1 \cap R_2
R1∩R2 is an equivalence relation,
R
1
∪
R
2
R_1 \cup R_2
R1∪R2 is reflexive and symmetric.
Collary:
(
R
1
∪
R
2
)
∗
(R_1 \cup R_2)^*
(R1∪R2)∗ is an equivalence relation
Definition:
A partition of set
A
A
A is a collection of disjoint nonempty subsets of
A
A
A that have
A
A
A as their union.
p
r
(
A
)
=
{
A
i
∣
i
∈
I
}
pr(A)=\{A_i \, | \, i \in I\}
pr(A)={Ai∣i∈I}, where
I
I
I is an index set,
A
i
≠
∅
A_i \neq \varnothing
Ai=∅,
A
i
∩
A
j
=
∅
(
i
≠
j
)
,
⋃
i
∈
I
A
i
=
A
A_i \cap A_j=\varnothing(i \neq j), \bigcup\limits_{i \in I}{A_i}=A
Ai∩Aj=∅(i=j),i∈I⋃Ai=A.
Partial Orderings
Definition:
A relation
R
R
R on set
S
S
S is a partial ordering iff
R
R
R is reflexive, antisymmetric and transitive.
For notation,
(
S
,
R
)
(S,R)
(S,R) is a partially ordered set, or poset for short.
The elements
a
a
a and
b
b
b of a poset
(
S
,
≼
)
(S,\preccurlyeq)
(S,≼) are comparable if either
a
≼
b
a \preccurlyeq b
a≼b or
b
≼
a
b \preccurlyeq a
b≼a.
When neither
a
≼
b
a \preccurlyeq b
a≼b or
b
≼
a
b \preccurlyeq a
b≼a, then
a
a
a and
b
b
b are called incomparable.
If
(
S
,
≼
)
(S,\preccurlyeq)
(S,≼) is a poset and
∀
(
a
,
b
)
∈
S
\forall (a,b) \in S
∀(a,b)∈S are comparable,
S
S
S is totally ordered or linearly ordered.
In this case,
≼
\preccurlyeq
≼ is called a total order or linear order.
ENG | CHN | Denote |
---|---|---|
Maximal Element(s) | 极大值 | ∃ a ∈ A ( ¬ ∃ b ∈ A ( a ≺ b ) ) \exist a \in A(\neg \exist b \in A(a \prec b)) ∃a∈A(¬∃b∈A(a≺b)) |
Minimal Element(s) | 极小值 | ∃ a ∈ A ( ¬ ∃ b ∈ A ( b ≺ a ) ) \exist a \in A(\neg \exist b \in A(b \prec a)) ∃a∈A(¬∃b∈A(b≺a)) |
Greatest Element | 最大值 | ∃ a ∈ A ( ∀ b ∈ A ( b ≼ a ) ) \exist a \in A(\forall b \in A(b \preccurlyeq a)) ∃a∈A(∀b∈A(b≼a)) |
Least Element | 最小值 | ∃ a ∈ A ( ∀ b ∈ A ( a ≼ b ) ) \exist a \in A(\forall b \in A(a \preccurlyeq b)) ∃a∈A(∀b∈A(a≼b)) |
Upper Bound | 上界 |
∃
a
∈
S
(
∀
b
∈
A
(
b
≺
a
)
)
\exist a \in S(\forall b \in A(b \prec a))
∃a∈S(∀b∈A(b≺a)) A ⊆ S A \subseteq S A⊆S |
Lower Bound | 下界 |
∃
a
∈
S
(
∀
b
∈
A
(
a
≺
b
)
)
\exist a \in S(\forall b \in A(a \prec b))
∃a∈S(∀b∈A(a≺b)) A ⊆ S A \subseteq S A⊆S |
Least Upper Bound | 上确界 | min a \min{a} mina |
Greatest Lower Bound | 下确界 | max a \max{a} maxa |
A poset
(
A
,
R
)
(A,R)
(A,R) is well-ordered iff every nonempty subset of
A
A
A has a least element.
A poset is called a lattice iff every pair of elements has a
l
u
b
\mathrm{lub}
lub and a
g
l
b
\mathrm{glb}
glb.
10. Graphs
Let
G
=
(
V
,
E
)
G=(V,E)
G=(V,E) be an undirected graph with
e
e
e edges, then
∑
v
∈
V
deg
(
v
)
=
2
e
\sum\limits_{v \in V}{\deg(v)}=2e
v∈V∑deg(v)=2e.
Let
G
=
(
V
,
E
)
G=(V,E)
G=(V,E) be a digraph, then
∑
v
∈
V
deg
+
(
v
)
=
∑
v
∈
V
deg
−
(
v
)
=
∣
E
∣
\sum\limits_{v \in V}{\deg^+(v)}=\sum\limits_{v \in V}{\deg^-(v)}=|E|
v∈V∑deg+(v)=v∈V∑deg−(v)=∣E∣.
Some Special Simple Graphs
Denote | i.e. |
---|---|
K n K_n Kn | Complete Graph |
C n ( n ≥ 3 ) C_n \ (n \ge 3) Cn (n≥3) | Cycle |
W n ( n ≥ 3 ) W_n \ (n \ge 3) Wn (n≥3) | Wheel |
Q n Q_n Qn | n n n-Cube |
K m , n ( m = ∣ V 1 ∣ , n = ∣ V 2 ∣ ) K_{m,n} \ (m=\vert V_1 \vert , n=\vert V_2 \vert) Km,n (m=∣V1∣,n=∣V2∣) | Complete Bipartite Graph |
Regular graph:
A simply graph is called regular if every vertex of this graph has the same degree.
A regular graph is called
n
n
n-regular if every vertex in this graph has degree
n
n
n.
New Graphs from Old
Subgraph:
Let
G
=
(
V
,
E
)
G=(V,E)
G=(V,E),
H
=
(
W
,
F
)
H=(W,F)
H=(W,F).
H
H
H is a subgraph of
G
G
G if
W
⊆
V
W \subseteq V
W⊆V and
F
⊆
E
F \subseteq E
F⊆E.
Subgraph
H
H
H is a proper subgraph of
G
G
G if
H
≠
G
H \neq G
H=G.
H
H
H is a spanning subgraph of
G
G
G if
W
=
V
W=V
W=V and
F
⊆
E
F \subseteq E
F⊆E.
Union:
Let
G
1
=
(
V
1
,
E
1
)
G_1=(V_1,E_1)
G1=(V1,E1),
G
2
=
(
V
2
,
E
2
)
G_2=(V_2,E_2)
G2=(V2,E2), then
G
1
∪
G
2
=
(
V
1
∪
V
2
,
E
1
∪
E
2
)
G_1 \cup G_2=(V_1 \cup V_2, E_1 \cup E_2)
G1∪G2=(V1∪V2,E1∪E2).
Representing Graphs
Adjacency matrix:
A
G
=
[
a
i
j
]
n
A_G=[a_{ij}]_n
AG=[aij]n,
a
i
j
=
1
a_{ij}=1
aij=1 if
{
v
i
,
v
j
}
\{v_i,v_j\}
{vi,vj} is an edge of
G
G
G, or
a
i
j
=
0
a_{ij}=0
aij=0 otherwise.
Incidence matrix:
M
G
=
[
m
i
j
]
n
×
m
M_G=[m_{ij}]_{n \times m}
MG=[mij]n×m,
m
i
j
=
1
m_{ij}=1
mij=1 if
e
j
e_j
ej is incident with
v
i
v_i
vi, or
m
i
j
=
0
m_{ij}=0
mij=0 otherwise.
Isomorphism(同构):
Formally, two simple graphs
G
1
=
(
V
1
,
E
1
)
G_1=(V_1,E_1)
G1=(V1,E1) and
G
2
=
(
V
2
,
E
2
)
G_2=(V_2,E_2)
G2=(V2,E2) are isomorphic.
If and only if there is an bijection
f
f
f from
V
1
V_1
V1 to
V
2
V_2
V2 such that
∀
a
,
b
∈
V
1
\forall a, b \in V_1
∀a,b∈V1.
a
a
a and
b
b
b are adjacent in
G
1
G_1
G1 while
f
(
a
)
f(a)
f(a) and
f
(
b
)
f(b)
f(b) are adjacent in
G
2
G_2
G2.
Connectivity
The number of different paths of length
r
r
r from
v
i
v_i
vi to
v
j
v_j
vj is equal to the
(
i
,
j
)
(i, j)
(i,j)-th entry of
A
r
A^r
Ar.
The maximally connected subgraphs of
G
G
G are called the connected components.
A vertex is a cut vertex or articulation point, if removing it and its incident edges results in more connected components.
Similarly if removal of an edge creates more components the edge is called a cut edge or bridge.
A directed graph is strongly connected if there is a path from
a
a
a to
b
b
b and from
b
b
b to
a
a
a for all vertices
a
a
a and
b
b
b in the graph.
The graph is weakly connected if the underlying undirected graph is connected.
For directed graph, the maximal strongly connected subgraphs are called the strongly connected components.
Euler and Hamilton Paths
Definition:
A connected multigraph has an Euler circuit if and only if each of its vertices has even degree.
A connected multigraph has an Euler path but not an Euler circuit if and only if it has exactly two vertices of odd degree.
A Hamilton path in a graph
G
G
G is a path which visits every vertex in
G
G
G exactly once.
A Hamilton circuit visits every vertex exactly once, except for the first vertex, which is also the end of the cycle.
Sufficient Condition:
Let
G
G
G be a simple graph with
n
n
n
(
n
≥
3
)
(n \ge 3)
(n≥3) vertices.
Dirac’s Theroem(狄拉克定理) If
deg
v
∈
G
(
v
)
≥
n
2
\deg\limits_{v \in G}(v)\ge \dfrac{n}{2}
v∈Gdeg(v)≥2n, then
G
G
G has a Hamilton circuit.
Ore’s Theroem(奥勒定理) If
deg
(
u
)
+
deg
(
v
)
≥
n
\deg(u)+\deg(v) \ge n
deg(u)+deg(v)≥n
(
∀
u
,
v
∈
G
,
¬
e
u
v
)
(\forall u,v \in G, \neg e_{uv})
(∀u,v∈G,¬euv), then
G
G
G has a Hamilton circuit.
Planar Graphs
Euler’s formula:
Let
G
G
G be a connected planar simple graph with
e
e
e edges and
v
v
v vertices.
Let
r
r
r be the number of regions in a planar representation of
G
G
G.
Then we have the formula
r
=
e
−
v
+
2
r=e-v+2
r=e−v+2.
Degree of Region:
Suppose
R
R
R is a region of a connected planar simple graph.
The number of edges on the boundary of
R
R
R is called the Degree of
R
R
R, denoted by
D
e
g
(
R
)
\mathrm{Deg}(R)
Deg(R).
Collary:
If
G
G
G is a connected planar simple graph with
e
e
e edges and
v
v
v
(
v
≥
3
)
(v \ge 3)
(v≥3) vertices, then
e
≤
3
v
−
6
e \leq3v-6
e≤3v−6.
2
e
=
∑
R
i
∈
G
D
e
g
(
R
i
)
≥
3
r
⟹
r
=
e
−
v
+
2
≤
2
3
e
⟹
e
≤
3
v
−
6
2e=\sum\limits_{R_i \in G}{\mathrm{Deg}(R_i)} \ge 3r \Longrightarrow r=e-v+2 \leq \dfrac23 e \Longrightarrow e \leq 3v-6
2e=Ri∈G∑Deg(Ri)≥3r⟹r=e−v+2≤32e⟹e≤3v−6
If
G
G
G is a connected planar simple graph, then
G
G
G has a vertex
v
i
v_i
vi with
deg
(
v
i
)
≤
5
\deg(v_i) \leq 5
deg(vi)≤5.
(
2
e
=
∑
v
i
∈
V
deg
(
v
i
)
≥
6
v
)
∧
(
e
≤
3
v
−
6
⇔
2
e
≤
6
v
−
12
)
=
0
(2e=\sum\limits_{v_i \in V}{\deg(v_i)} \ge 6v) \land (e \leq 3v-6 \Leftrightarrow 2e \leq 6v-12)=0
(2e=vi∈V∑deg(vi)≥6v)∧(e≤3v−6⇔2e≤6v−12)=0
If G has
e
e
e edges and
v
v
v
(
v
≥
3
)
(v \ge 3)
(v≥3) vertices and no circuits of length
3
3
3,then
e
≤
2
v
−
4
e \leq 2v-4
e≤2v−4.
2
e
=
∑
R
i
∈
G
D
e
g
(
R
i
)
≥
4
r
⟹
r
=
e
−
v
+
2
≤
1
2
e
⟹
e
≤
2
v
−
4
2e=\sum\limits_{R_i \in G}{\mathrm{Deg}(R_i)} \ge 4r \Longrightarrow r=e-v+2 \leq \dfrac12 e \Longrightarrow e \leq 2v-4
2e=Ri∈G∑Deg(Ri)≥4r⟹r=e−v+2≤21e⟹e≤2v−4
Generally, if every region of G has at least
k
k
k edges, then
e
≤
k
(
v
−
2
)
k
−
2
e \leq \dfrac{k(v-2)}{k-2}
e≤k−2k(v−2).
Homeomorphism(同胚):
The graph
G
1
=
(
V
1
,
E
1
)
G_1=(V_1,E_1)
G1=(V1,E1) and
G
2
=
(
V
2
,
E
2
)
G_2=(V_2,E_2)
G2=(V2,E2) are called homeomorphic.
If and only if they can be obtained from the same graph by a sequence of elementary subdivision.
Kuratowski’s Theorem(库拉托斯基定理):
A graph is nonplanar if and only if it contains a subgraph homeomorphic to
K
3
,
3
K_{3,3}
K3,3 or
K
5
K_5
K5.
(updated 2021.5.14)