Presentation is loading. Please wait.

Presentation is loading. Please wait.

2.4 Operations on Relations

Similar presentations


Presentation on theme: "2.4 Operations on Relations"— Presentation transcript:

1 2.4 Operations on Relations
1.Inverse relation Definition 2.13: Let R be a relation from A to B. The inverse relation of R is a relation from B to A, we write R-1, defined by R-1= {(b,a)|(a,b)R}

2 Theorem 2.1:Let R,R1, and R2 be relation from A to B. Then
(2)(R1∪R2)-1=R1-1∪R2-1; (3)(R1∩R2)-1=R1-1∩R2-1; (4)(A×B)-1=B×A; (5)-1=; (7)(R1-R2)-1=R1-1-R2-1 (8)If R1R2 then R1-1R2-1

3 Theorem 2. 2:Let R be a relation on A
Theorem 2.2:Let R be a relation on A. Then R is symmetric if only if R=R-1. Proof: (1)If R is symmetric, then R=R-1。 RR-1 and R-1R。 (2)If R=R-1, then R is symmetric For any (a,b)R, (b,a)?R

4 2.Composition Definition 2.14: Let R1 be a relation from A to B, and R2 be a relation from B to C. The composition of R1 and R2, we write R2R1, is a relation from A to C, and is defined R2R1={(a,c)|there exist some bB so that (a,b)R1 and (b,c)R2, where aA and cC}. (1)R1 is a relation from A to B, and R2 is a relation from B to C (2)commutative law?  R1={(a1,b1), (a2,b3), (a1,b2)} R2={(b4,a1), (b4,c1), (b2,a2), (b3,c2)}

5 Associative law? For R1 A×B, R2B×C, and R3C×D R3(R2R1)=?(R3R2)R1 subset of A×D For any (a,d)R3(R2R1), (a,d)?(R3R2)R1, Similarity, (R3R2)R1R3(R2R1) Theorem 2.3:Let R1 be a relation from A to B, R2 be a relation from B to C, R3 be a relation from C to D. Then R3(R2R1)=(R3R2)R1(Associative law)

6 Definition 2. 15: Let R be a relation on A, and nN
Definition 2.15: Let R be a relation on A, and nN. The relation Rn is defined as follows. (1)R0 ={(a,a)|aA}), we write IA. (2)Rn+1=RRn. Theorem 2.4: Let R be a relation on A, and m,nN. Then (1)RmRn=Rm+n (2)(Rm)n=Rmn

7 A={a1,a2,,an},B={b1,b2,,bm} R1 and R2 be relations from A to B. MR1=(xij), MR2=(yij) MR1∪R2=(xijyij) MR1∩R2=(xijyij)   Example:A={2,3,4},B={1,3,5,7} R1={(2,3),(2,5),(2,7),(3,5),(3,7),(4,5),(4,7)} R2={(2,5),(3,3),(4,1),(4,7)} Inverse relation R-1 of R : MR-1=MRT, MRT is the transpose of MR.

8 A={a1,a2,,an},B={b1,b2,,bm}, C={c1,c2,,cr},
R1 be a relations from A to B, MR1=(xij)mn, R2 be a relation from B to C, MR2=(yij)nr. The composition R2R1 of R1 and R2,

9 Example:R={(a,b),(b,a),(a,c)},is not symmetric
+ (c,a),R'={(a,b),(b,a),(a,c), (c,a)},R' is symmetric. Closure

10 2.5 Closures of Relations 1.Introduction
Construct a new relation R‘, s.t. RR’, particular property, smallest relation closure Definition 2.17: Let R be a relation on a set A. R' is called the reflexive(symmetric, transitive) closure of R, we write r(R)(s(R),t(R) or R+), if there is a relation R' with reflexivity (symmetry, transitivity) containing R such that R' is a subset of every relation with reflexivity (symmetry, transitivity) containing R.

11 Condition: 1)R' is reflexivity(symmetry, transitivity) 2)RR' 3)For any reflexive(symmetric, transitive) relation R", If RR", then R'R" Example:If R is symmetric, s(R)=? If R is symmetric,then s(R)=R Contrariwise, If s(R)=R,then R is symmetric R is symmetric if only if s(R)=R Theorem 2.5: Let R be a relation on a set A. Then (1)R is reflexive if only if r(R)=R (2)R is symmetric if only if s(R)=R (3)R is transitive if only if t(R)=R

12 Theorem 2.6: Let R1 and R2 be relations on A, and R1R2. Then
(1)r(R1)r(R2); (2)s(R1)s(R2); (3)t(R1)t(R2)。 Proof: (3)R1R2t(R1)t(R2) Because R1R2, R1t(R2) t(R2) :transitivity

13 2.Computing closures Example:Let A={1,2,3},R={(1,2),(1,3)}. Then
Theorem 2.7: Let R be a relation on a set A, and IA be identity(diagonal) relation. Then r(R)=R∪IA(IA={(a,a)|aA}) Proof:Let R'=R∪IA. Definition of closure (1)For any aA, (a,a)?R'. (2) R?R'. (3)Suppose that R'' is reflexive and RR'',R'?R''

14 Theorem 2.8:Let R be a relation on a set A. Then s(R)=R∪R-1.
Proof:Let R'=R∪R-1 Definition of closure (1) R', symmetric? (2) R?R'. (3)Suppose that R'' is symmetric and RR'',R'?R'')

15 Example :symmetric closure of “<” on the set of integers,is“≠”
<,>, Let A is no empty set. The reflexive closure of empty relation on A is the identity relation on A The symmetric closure of empty relation on A, is an empty relation.

16 Theorem 2.9: Let R be a relation on A. Then
Theorem 2.10:Let A be a set with |A|=n, and let R be a relation on A. Then

17 Example:A={a,b,c,d},R={(a,b),(b,a), (b,c),(c,d)}, t(R)=?

18 Exercise: P135 32,34 P139 1,2,12, 21,22, P155 2,8,12,22,24,26,27,28,29,30 NEXT Equivalence Relation, P 136, i.e 4.5 Partial order relations,P ,i.e 6.1,6.2


Download ppt "2.4 Operations on Relations"

Similar presentations


Ads by Google