b5 1 relations
play

B5.1 Relations relation for natural numbers These are examples of - PowerPoint PPT Presentation

Discrete Mathematics in Computer Science October 7, 2020 B5. Relations Discrete Mathematics in Computer Science B5. Relations B5.1 Relations Malte Helmert, Gabriele R oger B5.2 Properties of Binary Relations University of Basel


  1. Discrete Mathematics in Computer Science October 7, 2020 — B5. Relations Discrete Mathematics in Computer Science B5. Relations B5.1 Relations Malte Helmert, Gabriele R¨ oger B5.2 Properties of Binary Relations University of Basel October 7, 2020 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 1 / 14 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 2 / 14 B5. Relations Relations B5. Relations Relations Relations: Informally ◮ Informally, a relation is some property that is true or false for an (ordered) collection of objects. ◮ We already know some relations, e. g. ◮ ⊆ relation for sets B5.1 Relations ◮ ≤ relation for natural numbers ◮ These are examples of binary relations, considering pairs of objects. ◮ There are also relations of higher arity, e. g. ◮ “ x + y = z ” for integers x , y , z . ◮ “The name, address and office number belong to the same person.” ◮ Relations are for example important for relational databases, semantic networks or knowledge representation and reasoning. Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 3 / 14 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 4 / 14

  2. B5. Relations Relations B5. Relations Relations Relations Relations: Examples ◮ ⊆ = { ( S , S ′ ) | S and S ′ are sets and Definition (Relation) Let S 1 , . . . , S n be sets. for every x ∈ S it holds that x ∈ S ′ } A relation over S 1 , . . . , S n is a set R ⊆ S 1 × · · · × S n . ◮ ≤ = { ( x , y ) | x , y ∈ N 0 and x < y or x = y } The arity of R is n . ◮ R = { ( x , y , z ) | x , y , z ∈ Z and x + y = z } ◮ R ′ = { (Gabi , Spiegelgasse 1 , 04.005) , (Salom´ e , Spiegelgasse 1 , 04.002) , ◮ A relation of arity n is a set of n -tuples. (Florian , Spiegelgasse 1 , 04.005) , ◮ The set contains the tuples (Augusto , Spiegelgasse 5 , 04.001) } for which the informal property is true. Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 5 / 14 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 6 / 14 B5. Relations Properties of Binary Relations B5. Relations Properties of Binary Relations Binary Relation A binary relation is a relation of arity 2: Definition (binary relation) A binary relation is a relation over two sets A and B . B5.2 Properties of Binary Relations ◮ Instead of ( x , y ) ∈ R , we also write xRy , e. g. x ≤ y instead of ( x , y ) ∈ ≤ ◮ If the sets are equal, we say “ R is a binary relation over A ” instead of “ R is a binary relation over A and A ”. ◮ Such a relation over a set is also called a homogeneous relation or an endorelation. Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 7 / 14 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 8 / 14

  3. B5. Relations Properties of Binary Relations B5. Relations Properties of Binary Relations Reflexivity Irreflexivity A reflexive relation relates every object to itself. A irreflexive relation never relates an object to itself. Definition (reflexive) Definition (irreflexive) A binary relation R over set A is reflexive A binary relation R over set A is irreflexive if for all a ∈ A it holds that ( a , a ) ∈ R . if for all a ∈ A it holds that ( a , a ) / ∈ R . Which of these relations are reflexive? Which of these relations are irreflexive? ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , a ) , ( b , c ) , ( c , c ) } over { a , b , c } ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , a ) , ( b , c ) , ( c , c ) } over { a , b , c } ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , b ) , ( b , c ) , ( c , c ) } over { a , b , c } ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , b ) , ( b , c ) , ( c , c ) } over { a , b , c } ◮ equality relation = on natural numbers ◮ equality relation = on natural numbers ◮ less-than relation ≤ on natural numbers ◮ less-than relation ≤ on natural numbers ◮ strictly-less-than relation < on natural numbers ◮ strictly-less-than relation < on natural numbers Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 9 / 14 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 10 / 14 B5. Relations Properties of Binary Relations B5. Relations Properties of Binary Relations Symmetry Asymmetry and Antisymmetry Definition (asymmetric and antisymmetric) Let R be a binary relation over set A . Definition (symmetric) Relation R is asymmetric if A binary relation R over set A is symmetric for all a , b ∈ A it holds that if ( a , b ) ∈ R then ( b , a ) / ∈ R . if for all a , b ∈ A it holds that ( a , b ) ∈ R iff ( b , a ) ∈ R . Relation R is antisymmetric if for all a , b ∈ A with a � = b it holds that if ( a , b ) ∈ R then ( b , a ) / ∈ R . Which of these relations are symmetric? ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , a ) , ( c , a ) , ( c , c ) } over { a , b , c } Which of these relations are asymmetric/antisymmetric? ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , b ) , ( b , c ) , ( c , c ) } over { a , b , c } ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , a ) , ( c , a ) , ( c , c ) } over { a , b , c } ◮ equality relation = on natural numbers ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , b ) , ( b , c ) , ( c , c ) } over { a , b , c } ◮ less-than relation ≤ on natural numbers ◮ equality relation = on natural numbers ◮ strictly-less-than relation < on natural numbers ◮ less-than relation ≤ on natural numbers ◮ strictly-less-than relation < on natural numbers How do these properties relate to irreflexivity? Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 11 / 14 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 12 / 14

  4. B5. Relations Properties of Binary Relations B5. Relations Properties of Binary Relations Transitivity Special Classes of Relations Definition A binary relation R over set A is transitive if it holds for all a , b , c ∈ A that ◮ Some important classes of relations are defined in terms of if ( a , b ) ∈ R and ( b , c ) ∈ R then ( a , c ) ∈ R . these properties. ◮ Equivalence relation: reflexive, symmetric, transitive ◮ Partial order: reflexive, antisymmetric, transitive Which of these relations are transitive? ◮ Strict order: irreflexive, asymmetric, transitive ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , a ) , ( c , a ) , ( c , c ) } over { a , b , c } ◮ . . . ◮ R = { ( a , a ) , ( a , b ) , ( a , c ) , ( b , b ) , ( b , c ) , ( c , c ) } over { a , b , c } ◮ We will consider these and other classes in detail. ◮ equality relation = on natural numbers ◮ less-than relation ≤ on natural numbers ◮ strictly-less-than relation < on natural numbers Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 13 / 14 Malte Helmert, Gabriele R¨ oger (University of Basel) Discrete Mathematics in Computer Science October 7, 2020 14 / 14

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