1. Relations 关系 (3) | 离散数学

957 阅读5分钟

9 Relations 关系

《离散数学及其应用 第八版》(Discrete Mathematics and Its Application 8th Edition)第九章


9.6 Patrial Order 偏序关系

A relation R on a set A is called a partial order if R is reflexive, antisymmetric, and transitive.

如果一个关系满足:

  • 自反性

  • 反对称性

  • 传递性

则这个关系称为偏序关系(Partical Order)

The set A together with the partial order R is called a partially ordered set, or simply a poset, and we will denote this poset by (A, R)

偏序关系和其集合共同构成偏序集(poset),记为 (A,R)(A, R)

例如 (Z+,)(Z+,)(Z+,)(Z^{+},\leqslant)\quad (Z^{+},\geqslant)\quad (Z^{+},|)\quad

(Z+,\textless)(Z^{+}, \textless) is not a poset


9.6.1 几类偏序关系

Comparability 可比性

If (A,)(A,\preccurlyeq) is a poset, the elements a and b are said to be

  • comparable if aba\preccurlyeq b or bab \preccurlyeq a

  • incomparable if neither aba \preccurlyeq b nor bab \preccurlyeq a

两个元素间存在偏序关系则称两个元素可比(comparable),不存在偏序关系则称不可比(incomparable)


Linear order 线序关系(全序关系)

If every pair of elements in a poset A is comparable, we say that A is called a totally ordered or linearly ordered set, and the partial order is called a totally order or linear order. We also say that A totally ordered set is a chain.

线序关系满足:

  • 集合内两两元素都可比

线序关系用哈斯图表示出来是一条

例如:

  • (Z+,)(Z^{+},\leqslant) 任何两个元素都是可比的,是链

  • (Z+,)(Z^{+},|) 有些元素不可比,不是链


Well-ordered set 良序

(S,)(S,\preccurlyeq) is a well-ordered set if it is a poset such that \preccurlyeq is a total ordering and every nonempty subset of SS has at least element.

每一个非空集合都能找到最小元素的全序集称为良序集(well-ordered set)

推论:

  • 有限关系集合的全序集一定是良序集

  • 无限关系集合的全序集不一定是良序集

例如:

  • (Z+,)(Z^{+},\leqslant) 是良序集,任何子集总能找到最小元

  • (Z,<)(Z,<) 不是良序集,因为 ZZ 的负整数子集没有最小元


Quasiorder 拟序关系

A relation R on a set A is called quasiorder if it is transitive and irreflexive

满足:

  • 传递性

  • 反自反性

的关系称为拟序关系(quasiorder)

例如 (P(S),)(Z+,<)(P(S),\subset)\quad (Z^{+},<)

拟序具有反对称性

RR 为拟序,则 RIAR\cup I_{A} 为偏序。偏序是拟序的扩展,拟序是偏序的缩减。


Product partial order 乘积偏序

If (A,)(A,\preccurlyeq) and (B,)(B,\preccurlyeq) are posets, then (A×B,)(A\times B,\preccurlyeq) is a poset, with partial order \preccurlyeq defined by (a,b)(a,b)(a,b)\leqslant (a',b') if aaa\leqslant a' in AA and bbb \leqslant b' in BB.

This ordering is called product partial order.

乘积偏序要满足有序对的第一元素和第二元素分别满足偏序关系


Lexicographic Order 字典序

If (A,)(A,\preccurlyeq) and (B,)(B,\preccurlyeq) are posets, then (A×B,)(A\times B,\prec) is a poset, with partial order \prec defined by (a,b)(a,b)(a,b)\prec (a',b') if a<aa < a' or if a=aa = a' and bbb \leqslant b'.

This ordering is called lexicographic or "dictionatry" order.

Extented to Cartesian produxts A1×A2××AnA_{1}\times A_{2}\times \cdots \times A_{n}.

词典顺序:首先比较第一元素,依次比较第二元素

看下面这个例子:

Pasted image 20220922162326.png

蓝色部分是字典序小于 (3, 4) 的有序对,红色方框内的是乘积偏序小于等于 (3, 4) 的有序对。


Covering Relation 覆盖关系

Let (S,)(S,\preccurlyeq) be a poset. We say that an element ySy \in S covers an element xSx \in S if xyx\prec y and there is no element zSz \in S such that xzyx\prec z \prec y. The set of pairs (x,y)(x, y) such that yy covers xx is called the covering relation of (S,)(S,\preccurlyeq)

覆盖关系是由偏序集中两个有直接关系的元素构成的有序对组成的集合


9.6.2 哈斯图

Hasse Diagrams 哈斯图的构造

Hasse Diagrams is the diagraph of a partial order on a finite set A that

  • deletes all self-cycles
  • eliminates all edges that are implied by the transitive property
  • draws the diagraph with all edges pointing upward

哈斯图以简洁的方式表示出偏序集中元素之间的关系。

从有向图表示的偏序关系改为哈斯图分三步:

  • 删除自环

  • 取消传递性而来的边

  • 边方向向上

Pasted image 20220922164039.png

Pasted image 20220922164101.png

根据覆盖关系求偏序

若已知一个覆盖关系,其实就是相当于已知了哈斯图,由哈斯图反演出有向图表示的偏序关系即为求覆盖关系的偏序的过程,分两步:

  • 恢复传递边:利用 Warshall 算法在关系矩阵上生成传递闭包

  • 恢复自环:给主对角线上的 0 全部变为 1

Pasted image 20220922164453.png


9.6.4 偏序集的重要元素

Maximal(miminal) element 极大(极小)元

An element a \in A is called a maximal element of A if there is no element c in A such that a < c.

An element b \in A is called a minimal element of A if there is no element c in A such that c < b.

  • 极大元就是比选定子集任何一个元素都要靠后的元素,只能在子集内中找

  • 极小元就是比选定子集任何一个元素都要靠前的元素,只能在子集内中找

Pasted image 20220922165235.png

注意:极大极小元并不唯一,且同一元素既可能是极大元,又可能是极小元

例如:

Pasted image 20220922165450.png

定理:有限非空偏序集,集合 A 至少有一个极大元和一个极小元


Greatest (least) element 最大元(最小元)

定义:偏序集 (P,)(P,\preccurlyeq) 中,子集 APA\subseteq P

  • aAa\in A ,对 bA\forall b\in A 都有 bab\leqslant aaaAA 的最大元

  • aAa\in A ,对 bA\forall b\in A 都有 aba\leqslant baaAA 的最小元

注意:最大元和最小元都在子集 A 中找。

子集 A 的最大元或最小元如果存在,则与 A 中的任意元素必须可比

有时候最大最小元可能不存在:

Pasted image 20220922170618.png

如果 A 是全集,则

  • 最大元通常用 1 表示,称为单位元

  • 最小元通常用 0 表示,称为零元


lub 最小上界 glb 最大下界

pose A and a subset B (B is a subset of A)

An element a \in A is called a upper bound of B is b \leqslant a for all b \in B.

An element a \in A is called a upper bound of B is a \leqslant b for all b \in B.

  • 子集 B 的最小上界(least upper bound)就是比 B 任何一个元素都要靠后的第一个元素,是在全集中找,有可能在子集内也可能在子集外

  • 子集 B 的最大下界(greatest lower bound)就是比 B 任何一个元素都要靠前的第一个元素,是在全集中找,有可能在子集内也可能在子集外

总结

  • 有限非空集合极大元、极小元各至少一个

  • 最大元、最小元各最多一个

  • 子集的最小上界、最大下界各最多一个


9.6.5 拓扑排序

Topological Sorting 拓扑排序

A total ordering \preccurlyeq is said to be compatible with the partial ordering R if a \preccurlyeq b whenever aRb. Constructing a compatible total ordering from a partial /ordering is called topological sorting.

Pasted image 20220922171912.png

一个偏序集可能给出多个不同的拓扑排序


二元关系思维导图

Pasted image 20220922172131.png


9.6.6 格

Lattices 格的定义

A lattice is a poset in which every subset {a, b} consisting of two elements has a least upper bound (l.u.b) and a greatesr lower bound (g.l.b)

denote l.u.b({a, b}) by aba\lor b and call it the join of a and b

denote g.l.b({a, b}) by aba\land b and call it the meet of a and b

  • 是任意两个元素构成的子集都有最小上界和最大下界的偏序集

  • 用并表示两个元素构成子集的 l.u.b ,用交表示两个元素构成子集的 g.l.b

定理:两个格的氏积也是一个格

子格(sublattice)类比子集的定义

Properties of lattices 格的性质

格是特殊的偏序,所以格具有偏序的所有性质

特性:格的 l.u.b 和 g.l.b 都是唯一的

Pasted image 20220923184025.png

Pasted image 20220923184039.png

定理:

Let L be a lattice. Then for every a and b in L,

  • ab=ba\lor b = b if and only if aba\leqslant b

  • ab=aa\land b = a if and only if aba\leqslant b

  • ab=aa\land b = a if and only if ab=ba\lor b = b

Pasted image 20220923185433.png

Pasted image 20220923185454.png

Special types of lattices 几种特殊的格

有界格

如果格存在一个最大元 1 ,一个最小元 0 ,则这个格是有界格。最大元和最小元唯一。

Pasted image 20220923185651.png

所有有限格都是有界格

分配格

任意元素之间的 l.u.b 和 g.l.b 都符合分配律的格称为分配格

Pasted image 20220923185828.png

Pasted image 20220923185847.png

如果一个格的子格与上述两个特殊的格任何一个同构的,则不是分配格

Pasted image 20220923185932.png

补元(Complement)

Pasted image 20220923190200.png

有补格

一个有界格中,如果每个元素都有补元,则称之为有补格。

Pasted image 20220923190302.png

Pasted image 20220923190319.png

模格

L 是模格,当且仅当不含与五角格同构的子格。

Pasted image 20220923190411.png

Pasted image 20220923190434.png

Lattices:

  • modular

    • distributive
    • nondistributive
  • nonmodular