04 Notes Discrete Mathematics - Relationship - Based on Discrete Mathematics (3rd Edition)_Zhang Jiongmin, Tao Zengle

concept of relationship

X, Y are sets, R is a subset of X×Y, then R is called a binary relationship from X to Y, if X=Y, R is called a relationship on X, (x,y)∈R is called x , y satisfies the relation R, denoted as xRy, x is the antecedent of y, y is the postkey of x

Definition
Let R be a binary relation from X to Y, the definition domain of R is recorded as dom(R), the value range of R is recorded as ran( R )
dom ( R ) = { x ∣ x ∈ X , and there exists y ∈ Y Let ( x , y ) ∈ R } dom(R) = \{x|x∈X, and there exists y∈Y such that (x,y)∈R\}dom(R)={ xxX , and there exists yY makes ( x ,y)R }
ran ( R ) = { y ∣ y ∈ Y , and there exists x ∈ X such that ( x , y ) ∈ R } ran(R) = \{y|y∈Y, and there exists x∈X such that (x, y)∈R\}ran(R)={ yyY , and there exists xX makes ( x ,y)R}

Empty relation: empty set
Full relation: X×Y
Identity relation: {(x,x)|x∈X}

A function f of a function
X to Y makes a binary relation X to Y
1) dom(f) = X
2) ∀ x ∈ X , y 1 , y 2 ∈ Y , ( x , y 1 ) ∈ f ∧ ( x , y 2 ) ∈ f → y 1 = y 2 \forall x∈X,y_1,y_2∈Y,(x,y_1)∈f\land(x,y_2)∈f \rightarrow y_1=y_2xXy1y2Y,(x,y1)f(x,y2)fy1=y2

Binary Representation

1) The method of expressing the set
2) The relationship graph
uses X, Y and that to represent the vertices in the graph, generally X is left and Y is right, when (x, y)∈R, use a directed edge to draw from x to y, x= When y, draw a circle
insert image description here

3) Relational matrix
m×n matrix, if it belongs to take 1, if it does not belong to take 0

n-ary relationship

X1...Xn is a subset of n sets
X1×...×Xn R is an n-ary relationship

Relational operations

逆关系
R − 1 = { ( y , x ) ∣ ( x , y ) ∈ R }   ⊆ Y × X R^{-1}=\{(y,x)|(x,y)∈R\}\ \subseteq Y×X R1={ (y,x)(x,y)R} Y×X
complement relation
x<y
inverse relation is x>y
complement relation is x≥y
composite relation
R = { ( x , z ) ∣ x ∈ X , z ∈ Z and there exists y belonging to Y , ( x , y ) ∈ R , ( y , z ) ∈ S } R=\{(x,z)|x∈X, z∈Z and there exists y belonging to Y, (x,y)∈R,(y,z)∈S\}R={ (x,z)xXzZ and there exists y belonging to Y , ( x ,y)R,(y,z)S}

Composite relations do not satisfy the commutative law
, not any two relations can be compounded

Power
Let R be the relationship on X, n∈N
R’s nth power R^n
R n = { IX n = 0 R n − 1 R other R^n=\left\{ \begin{aligned} I_X& &n= 0 \\ R^{n-1} R & & other \\ \end{aligned} \right.Rn={ IXRn1Rn=0Other

Restriction
Let R be a relation on X, and Y be a subset of X, then the relation on Y {(x,y)|x, y∈Y, and (x,y)∈R} is called the restriction of R on Y

Properties of relational operations

( R − 1 ) − 1 = R (R^{-1})^{-1}=R (R1)1=R
( R ∪ S ) − 1 = R − 1 ∪ S − 1 ( R ∩ S ) − 1 = R − 1 ∩ S − 1 (R\cup S)^{-1}=R^{-1}\cup S^{-1}\quad (R\cap S)^{-1}=R^{-1}\cap S^{-1} (RS)1=R1S1(RS)1=R1S1
( R ∘ S ) − 1 = S − 1 ∘ R − 1 (R\circ S)^{-1}=S^{-1}\circ R^{-1} (RS)1=S1R1
( R ∘ S ) ∘ T = R ∘ ( S ∘ T ) (R\circ S)\circ T = R\circ (S\circ T) (RS)T=R(ST)

Theorem
Let R be a relation on X, then for any positive integer n and any x,y∈X, (x,y)∈R^k is
equivalent to the existence of n+1 tuples (x0...xn)∈X^ {n+1}
where x0 = x, xn = y. For any i, (x_i, x_{i+1}) ∈ R

Corollary 1
R is the relation of X, m, n∈N
R m R n = R m + n R^mR^n = R^{m+n}RmRn=Rm + n
Corollary 2
Let R be a relation on a finite set X, |X|=n, n∈N, for any x, y∈X, m∈N, if (x,y)∈R m , thereexistsk∈ N, k≤n, such that (x,y)∈Rk

Corollary 3
|X|=n
⋃ m = 1 ∞ R m = ⋃ m = 1 n R m \bigcup^∞_{m=1}R^m=\bigcup^n_{m=1}R^mm=1Rm=m=1nRm

relation special property closure

Special properties 1) x ∈ X, there is always (x, x) ∈ R, R is a reflexive relation
on X 2) x ∈ X, there is always (x, x) that does not belong to R, and R is a reflexive relation on X Inverse relation 3) x, y ∈ X, as long as (x, y) ∈ R, there is (y, x) ∈ R, R is a symmetric relation on X 4) x, y ∈ X, as long as (x, y) ∈R and (y,x)∈R has x=y, R is an antisymmetric relation on X 5) 3) x, y, z∈X, as long as (x,y)∈R and (y,z) ∈R, there is (x,z)∈R, R is the transitive relationship on X



Symbolic representation
1) reflexive
I x ⊆ R I_x \sube RIxR
2) Anti-reflexive
R ∩ IX = ∅ R\cap I_X = \emptyRIX=
3) Symmetric relation
R − 1 = RR^{-1}=RR1=R
4) Antisymmetric
R ∩ R = 1 ⊆ IXR\cap R^{=1}\sube I_XRR=1IX
5) The transitive relationship is equivalent to
R 2 ⊆ RR^2\sube RR2R
is deduced from (not equivalent, cannot be passed down
R n ⊆ RR^n\sube RRnR

Relation matrix indicates
1) Reflexive, diagonal is 1
2) Reflexive anti-diagonal is 0
3) Matrix symmetry
4) Matrix symmetry has at least one 0

Relation graph representation
1) A reflexive vertex has a cycle
2) An anti-reflexive vertex has no cycle
3) There are edges between symmetric vertices and there must be two opposite edges
4) An antisymmetric graph has at most one edge

Closure

Define
R as X relationship, P as relationship property, including R, with property P, and the minimum relationship on X is called P closure of R

The P closure of R is a relation R P on X , satisfying
1) R ⊆ RPR\sube R^PRRP
2)RP has property PR^P has property PRP haspropertyP
3) For any relation R' on X, if R' has property P
if R ⊆ R ′ , then RP ⊆ R ′ If R\sube R', then R^P\sube R'If RR,Then RPR

For example, R is a relation of X, and the transitive relation containing R on X is the transitive closure of R. If the relation T on X has the following properties
1) R ⊆ TR\sube TRT
2) T is transitive
3) Any transitive relationship containing R on X contains T
, then T is the transitive closure of R

Theorem
r reflexive closure, s symmetric closure, t transitive closure
1) r ( R ) = r ∪ IX r(R)=r\cup I_Xr(R)=rIX
2) s ( R ) = R ∪ R − 1 s(R)=R\cup R^{-1} s(R)=RR1
3) t ( R ) = ⋃ n = 1 ∞ R n t(R) = \bigcup^∞_{n=1}R^n t(R)=n=1Rn

Equivalence Relations and Partitioning

Equivalence relation
Definition: A relation
that satisfies reflexive, symmetric, and transitive relations at the same time
If R is an equivalence relation on X, xRy, then xRy is said to be equivalent to R
1) All relations of identity relations are equivalence relations
2) R The ≤ relationship is not an equivalence relationship
3) xRy is defined as: x and y have the same last name, R is an equivalence relationship
4) xSy, x and y have the same father or mother, S is not an equivalence relationship

Equivalence class
Definition:
Equivalence class of x on R [ x ] R : { y ∣ y ∈ X , and y R x } ⊆ XR : Equivalence relation on X, x ∈ X [x]_R:\{y |y∈X, and yRx\}\sube X\\ R: Equivalence relation on X, x∈X[x]R:{ yyX , and y R x }XR:Equivalence relation on X , x _The representative element x of X
equivalent class [x]_R

Congruence relation R_m modulo m and congruence class
1)
R m = { ( x , y ) ∣ x , y ∈ Z , x ≡ y ( mod m ) } , m ∈ N R_m=\{(x,y) |x,y∈Z,x≡y(mod\ m)\},m∈NRm={ (x,y)x,yZxy ( m o d m ) } , mN
R_m is the equivalence relation on Z
2) For the congruence relation R_3
0, 1, 2 in Z modulo 3, the equivalence class
[ 0 ] R 3 = { 3 n ∣ n ∈ Z } [ 1 ] R 3 = { 3 n + 1 ∣ n ∈ Z } [ 2 ] R 3 = { 3 n + 2 ∣ n ∈ Z } [0]_{R3} = \{3n|n∈Z\}\\ [1]_{ R3} = \{3n + 1|n∈Z\}\\ [2]_{R3} = \{3n + 2|n∈Z\}\\[0]R 3={ 3nnZ}[1]R 3={ 3 n+1nZ}[2]R 3={ 3 n+2nZ}

Theorem
R is an equivalence relation
1) x R y ⇒ [ x ] R = = [ y ] R xRy \Rightarrow [x]_R == [y]_Rx R y[x]R==[y]R
2) ¬ x R y ⇒ [ x ] R ∪ [ y ] R = ∅ \lnot xRy \Rightarrow [x]_R\cup [y]_R = \empty ¬xRy[x]R[y]R=
3) ⋃ x ∈ X [ z ] R = X \bigcup_{x∈X}[z]_R = X xX[z]R=X

Properties
1) Any element of an equivalence class can be used as a representative element of an equivalence class
2) Any two equivalence classes are equal or have no common elements
3) An equivalence class is composed of all those elements that are equivalent to each other

Business set
X with respect to R Business set X/R: A set of all equivalence classes of X with respect to R
X/R = {[x]_R| x ∈ R}
R: Equivalence relation on X

For example
Z / R 3 = { [ 0 ] R 3 , [ 1 ] R 3 , [ 2 ] R 3 } Z/R3 = \{[0]_{R3},[1]_{R3},[2] _{R3}\}Z / R 3={ [0]R 3,[1]R 3,[2]R 3}

to divide

division of x by pi

π ⊆ P ( X ) ∀ A ∈ π , A ≠ ∅ ∀ A , B ∈ π , ( A = B ∨ A ∩ B = ∅ ) ∪ π = X \pi \sube P(X) \\ \forall A ∈ \pi,A≠\empty \\ \forall A,B∈\pi ,(A = B\lor A\cap B = \empty )\\ \cup \pi = X PiP(X)Ap ,A=A,Bp ,A=BAB=Pi=X
Theorem
R is an equivalence relation of X
X/R is a division of X

pi is the division of X, and the R relationship is defined as follows
R = { ( x , y ) ∣ x , y ∈ π The same division block} R=\{(x,y)|x,y∈\pi The same division piece\}R={ (x,y)x,yThe same division block of π }
R is the equivalence relation on X

Partial order

X is a set, and the reflexive , antisymmetric , and transitive relationship on X is the partial order relationship on X, referred to as partial order, also known as partial order relationship

If ≤ is a partial order of X, one of any two elements x, y, x≤y or y≤x of X always holds true, and ≤ is a total order on X. If ≤ is a partial order of X, X
and partial The order ≤ is called a partial order set, and it is recorded as a two-tuple (X, ≤). If ≤ is a total order on the set X, it is said that (X, ≤) is a total order set

x, y∈X, if x≤y or y≤x, x and y are said to be comparable with respect to partial order ≤

Hastu

Definition
A partially ordered set (X, ≤) x,y∈X
y covers x x < y ∧ ¬ ∃ z ∈ X such that x < z < y x<y\land \lnot \exist z∈X such that x < z < yx<y¬zX makes x<z<y
y is the immediate successor of x

The arrow between nodes x and y in the Hasse diagram
is connected if and only if y covers x and y is above x. By default, each point has a ring, so no ring is drawn

Property
(X, ≤) poset, a ∈ X
1) Any x ∈ X, if x ≤ a, a is called the largest element of (X, ≤)
2) a ≤ x, a is called (X, ≤)
3) There is no x belonging to X Let a<x, a is the maximum element of (X, ≤)
4) x<a, a is the minimum element of (X, ≤ )

The maximum (small) element is at most one or none
The maximum (small) element can have multiple or none The
maximum (small) element is not necessarily the largest (small) element The largest (small) element
must be a maximum element
When the largest (small) element exists, There is only one maximal (small) element
The maximal (small) element of a total ordered set must be the largest (small) element

Guess you like

Origin blog.csdn.net/JamSlade/article/details/120819774