relation between sets
play

Relation between sets 2/16 A relation R between sets A and B is a - PowerPoint PPT Presentation

Relation between sets 2/16 A relation R between sets A and B is a predicate on A B . R ( x, y ) means x A and y B are related. Example (Arrow Graph) The relation is child of is a Relations predicate on Lectures 89


  1. Relation between sets 2/16 A relation R between sets A and B is a predicate on A × B . R ( x, y ) means ‘ x ∈ A and y ∈ B are related.’ Example (Arrow Graph) The relation ‘is child of’ is a Relations predicate on Lectures 8–9 (Chapter 17) anna Children × Parents . ron bert sara In this example we have: clemens tim daphne R ( b, r ) , R ( b, s ) , R ( c, t ) , and R ( d, r ) A = Children B = Parents We sometimes write bRr instead of R ( b, r ) . / department of mathematics and computer science / department of mathematics and computer science Relation between sets Relation on a set 3/16 4/16 A relation R between sets A and B is a subset of A × B . A relation R on A is a relation between A and A . That is: R ⊆ A × B . Example (Cartesian Graph) Example (Directed Graph) R on {− 1 , 0 , 1 } with R ( x, y ) if | x | = | y | : t R = { ( b, r ) , ( b, s ) , ( c, t ) , ( d, r ) } . − 1 0 1 B s r a b c d A We sometimes write ( b, r ) ∈ R instead of R ( b, r ) . / department of mathematics and computer science / department of mathematics and computer science

  2. Reflexive relations Symmetric relations 5/16 6/16 A relation R on A is symmetric if if A relation R on A is reflexive if ∀ x,y [ x, y ∈ A : xRy ⇒ yRx ] . x y then ∀ x [ x ∈ A : xRx ] . x for all x, y ∈ A . for all x ∈ A . Symmetric: Not symmetric: val val Reflexive: Not reflexive: ◮ | = = on abstr. props = = on abstr. props ◮ val val ◮ > on R = = , | = = on abstr. props ◮ ◮ = on R ◮ > , ≥ on R ◮ = , ≥ on R ◮ R on N with xRy if x = 3 y ◮ ‘ is married ’ on people ◮ ‘ is child of ’ on people (Counterexample: ¬ (1 R 1) .) ◮ . . . ◮ R on N with xRy if x = 3 y ◮ . . . ◮ . . . (Counterexample: 6 R 2 , but ¬ (2 R 6) ) ◮ . . . / department of mathematics and computer science / department of mathematics and computer science Transitive relations Equivalence relation 7/16 8/16 R on A is an equivalence relation if and only if if 1. R is reflexive, and A relation R on A is transitive if 2. R is symmetric, and x y z ∀ x,y,z [ x, y, z ∈ A : ( xRy ∧ yRz ) ⇒ xRz ] . then 3. R is transitive. for all x, y, z ∈ A . Examples Transitive: Not transitive: val = = on abstr. props ◮ val val ◮ ‘is sister of’ on people = = , | = = on abstr. props ◮ = on N , Z , R , C , . . . ◮ ∃ k [ k ∈ Z : x − y = k · 6] ◮ = on sets ◮ = , > , ≥ on R ◮ R on N with xRy if x = 3 y ◮ the relation ≡ 6 on Z defined by (Counterexample: 18 R 6 and ◮ . . . 6 R 2 , but ¬ (18 R 2) ) x ≡ 6 y if x − y is a multiple of 6 ◮ . . . (e.g., 10 ≡ 6 4 , 61 ≡ 6 1 , − 2 ≡ 6 10 , 9 ≡ 6 9 ) / department of mathematics and computer science / department of mathematics and computer science

  3. ≡ 6 on Z ≡ 6 is transitive: 10/16 11/16 Define the binary relation ≡ 6 on Z by var x, y, z ; x, y, z ∈ Z x ≡ 6 y if ∃ k [ k ∈ Z : x − y = 6 · k ] . x ≡ 6 y ∧ y ≡ 6 z Fact ∃ k [ k ∈ Z : x − y = 6 · k ] ( ∧ -elim + definition ≡ 6 ) ≡ 6 is an equivalence relation on Z . Pick a k with k ∈ Z and x − y = 6 · k ( ∃ ∗ -elim) ∃ ℓ [ ℓ ∈ Z : y − z = 6 · ℓ ] ( ∧ -elim + definition ≡ 6 ) Proof: We need to prove that Pick an ℓ with ℓ ∈ Z and y − z = 6 · ℓ ( ∃ ∗ -elim) x − z = ( x − y ) + ( y − z ) = 6 · k + 6 · ℓ = 6 · ( k + ℓ ) (Mathematics) 1. ≡ 6 is reflexive; x − z = 6 · ( k + ℓ ) (Mathematics) [Proof: see book.] k + ℓ ∈ Z (since k ∈ Z and ℓ ∈ Z ) 2. ≡ 6 is symmetric; ∃ m [ m ∈ Z : x − z = 6 · m ] ( ∃ ∗ -intro) [Proof: see book.] x ≡ 6 z (definition ≡ 6 ) 3. ≡ 6 is transitive. ∀ x,y,z [ x, y, z ∈ Z : x ≡ 6 y ∧ y ≡ 6 z ⇒ x ≡ 6 z ] [Proof on next slide; see also book] Note: It is important to choose k and ℓ distinct in this proof. / department of mathematics and computer science / department of mathematics and computer science ≡ 6 is transitive: Equivalence classes 12/16 13/16 Let A be a set, let R be an equivalence relation on A . Proof: To prove that x ≡ 6 y and y ≡ 6 z implies x ≡ 6 z for all x, y, z ∈ Z , let K ( a ) def The equivalence class of = { x ∈ A | aRx } x, y, z ∈ Z and suppose that x ≡ 6 y and y ≡ 6 z ; we need to establish a ∈ A is the set of all end- that x ≡ 6 z . points of arrows from a . From x ≡ 6 y and y ≡ 6 z it follows, by the definition of ≡ 6 , that there exists k and ℓ with x − y = 6 · k and y − z = 6 · ℓ . Since R is an equivalence relation, b K ( a ) a c Hence, everything within a class is related. d For instance: b ′ x − z = ( x − y ) + ( y − z ) = 6 · k + 6 · ℓ = 6 · ( k + ℓ ) . K ( a ′ ) a ′ c ′ d ′ � symm. aRd dRa trans. Since k, ℓ ∈ Z , we also have that ( k + ℓ ) ∈ Z . � � dRc aRc So we have that x − z is a multiple of 6 , and hence, according to the Note: definition of ≡ 6 , it follows that x ≡ 6 z . K(a)=K(b)=K(c)=K(d) / department of mathematics and computer science / department of mathematics and computer science

  4. Equivalence classes Equivalence classes 14/16 15/16 Example Consider the equivalence relation ≡ 5 on Z . Example Let R be an equivalence relation on a set A , and let a, a ′ ∈ A . Prove that K (0) 0 Then, e.g., ¬ ( aRa ′ ) ⇒ K ( a ) ∩ K ( a ′ ) = ∅ K (1) 1 K (2) 2 K (3) = { . . . , − 7 , − 2 , 3 , 8 , 13 , . . . } . K (3) [Proof on next slide] 3 Note: K (4) = K (9) = K (14) = · · · 4 K (4) / department of mathematics and computer science / department of mathematics and computer science Example: ¬ ( aRa ′ ) ⇒ K ( a ) ∩ K ( a ′ ) = ∅ 16/16 (1) ¬ ( a R a ′ ) (2) var x ; x ∈ K ( a ) ∩ K ( a ′ ) (3) x ∈ K ( a ) ∧ x ∈ K ( a ′ ) (4) a R x a ′ R x (5) (6) x R a ′ ( ∀ -elim on ‘ R is symmetric’ followed by ⇒ -elim) (7) a R a ′ ( ∀ -elim on ‘ R is transitive’ followed by ∧ -intro and ⇒ -elim) (8) False (9) K ( a ) ∩ K ( a ′ ) = ∅ ¬ ( aRa ′ ) ⇒ K ( a ) ∩ K ( a ′ ) = ∅ (10) / department of mathematics and computer science

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend