Chapter Relations and Their Properties

Slides:



Advertisements
Similar presentations
Representing Relations
Advertisements

Relations Relations on a Set. Properties of Relations.
Representing Relations Rosen 7.3. Using Matrices For finite sets we can use zero-one matrices. Elements of each set A and B must be listed in some particular.
CSE115/ENGR160 Discrete Mathematics 04/26/12 Ming-Hsuan Yang UC Merced 1.
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Basic Properties of Relations
Representing Relations Using Matrices
8.4 Closures of Relations. Intro Consider the following example (telephone line, bus route,…) abc d Is R, defined above on the set A={a, b, c, d}, transitive?
Ch. 8: Relations 8.1 Relations and their Properties.
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
1 Representing Relations Part 2: directed graphs.
Relations binary relations xRy on sets x  X y  Y R  X  Y Example: “less than” relation from A={0,1,2} to B={1,2,3} use traditional notation 0 < 1,
1 Section 7.1 Relations and their properties. 2 Binary relation A binary relation is a set of ordered pairs that expresses a relationship between elements.
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Applied Discrete Mathematics Week 10: Equivalence Relations
Chapter Relations and Their Properties 8.2 n-ary Relations and Their Applications 8.3 Representing Relations 8.4 Closures of Relations 8.5 Equivalence.
Exam 2 Review 8.2, 8.5, 8.6, Thm. 1 for 2 roots, Thm. 2 for 1 root Theorem 1: Let c 1, c 2 be elements of the real numbers. Suppose r 2 -c 1.
Exam 2 Review 7.5, 7.6, |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩
Properties of Relations In many applications to computer science and applied mathematics, we deal with relations on a set A rather than relations from.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Discrete Math for CS Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation.
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
CSC-2259 Discrete Structures
Digraphs and Relations Warm Up. The Divisibility Relation Let “|” be the binary relation on N×N such that a|b (“a divides b”) iff there is an n ∈ N such.
8.3 Representing Relations Directed Graphs –Vertex –Arc (directed edge) –Initial vertex –Terminal vertex.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Relations and their Properties
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
Mathematical Preliminaries
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
1 Chapter Equivalence, Order, and Inductive Proof.
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Discrete Structures – CNS2300
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Representing Relations Using Matrices A relation between finite sets can be represented using a zero-one matrix Suppose R is a relation from A = {a 1,
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of.
8.5 Equivalence Relations
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Chap. 7 Relations: The Second Time Around
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Module Code MA1032N: Logic Lecture for Week Autumn.
Chapter8 Relations 8.1: Relations and their properties.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
Relations and Their Properties
Introduction to Relations
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
Equivalence Relations
Relations Chapter 9.
Representing Relations
Reflexivity, Symmetry, and Transitivity
Mathematical Structures for Computer Science Chapter 6
Applied Discrete Mathematics Week 10: Equivalence Relations
Relations (sections 7.1 – 7.5)
Relations and Digraphs
Relations and their Properties
CSE 321 Discrete Structures
9.5 Equivalence Relations
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Chapter 8 (Part 2): Relations
Agenda Lecture Content: Relations (Relasi)
Presentation transcript:

Chapter 8 8.1 Relations and Their Properties 8.2 n-ary Relations and Their Applications 8.3 Representing Relations 8.4 Closures of Relations 8.5 Equivalence Relations 8.6 Partial Orderings

8.1 Relations and Their Properties Definition: A binary relation R from a set A to a set B is a subset R Í A  B. . Note: there are no constraints on relations as there are on functions. We have a common graphical representation of relations: Definition: A Directed graph or a Digraph D from A to B is a collection of vertices V Í AÈ B and a collection of edges R Í A  B . If there is an ordered pair e = <x, y> in R then there is an arc or edge from x to y in D. The elements x and y are called the initial and terminal vertices of the edge e.

Relations and Their Properties Examples: Let A = { a, b, c} B = {1, 2, 3, 4} R is defined by the ordered pairs or edges {<a, 1>, <a, 2>, <c, 4>} can be represented by the digraph D:

Relations on a Set Definition: A binary relation R on a set A is a subset of A  A or a relation from A to A. Example: A = {a, b, c} , R = {<a, a>, <a, b>, <a, c>}. Then a digraph representation of R is: Note: An arc of the form <x, x> on a digraph is called a loop. Example : How many binary relations are there on a set A? Example 4: Let A be the set {1, 2, 3, 4}. Which ordered pairs are in the relation R={(a ,b) | a divides b}?

Special Properties of Binary Relations Given: A Universe U A binary relation R on a subset A of U Definition: R is reflexive iff "x [ x Î U ® < x, x >ÎR ] Note: if U = Æ then the implication is true vacuously The void relation on a void Universe is reflexive! Note: If U is not void then all vertices in a reflexive relation must have loops!

Properties of Relations Example 7: Consider the following relations on {1, 2, 3, 4}: R1:{(1,1) ,(1, 2), (2, 1), (2, 2), (3, 4), (4, 1) ,(4, 4)}. R2:{(1,1) ,(1, 2), (2, 1)}. R3:{(1,1) ,(1, 2), (1, 4), (2, 1), (2, 2), (3, 3) ,(4, 1), (4, 4)}. R4:{(2, 1), (3, 1), (3, 2), (4, 1) ,(4, 2), (4, 3)}. R5:{(1,1) ,(1, 2), (1, 3), (1, 4), (2, 2), (2, 3) ,(2, 4), (3, 3), (3, 4), (4, 4)}. R6:{ (3, 4)}. Which of these relations are reflexive?

Properties of Relations Definition: R is symmetric iff "x"y [< x, y >Î R ® < y, x >Î R ] Note:If there is an arc <x, y> there must be an arc <y , x>. Definition: R is antisymmetric iff "x"y [ < x, y >Î R Ù < y, x >Î R® x = y ] Note: If there is an arc from x to y there cannot be one from y to x if x ≠ y. You should be able to show that logically: if <x, y> is in R and x ≠ y then <y, x> is not in R.

Properties of Relations Example 10: Which of the relations from Example 7 are symmetric and which are antisymmetric? R1:{(1,1) ,(1, 2), (2, 1), (2, 2), (3, 4), (4, 1) ,(4, 4)}. R2:{(1,1) ,(1, 2), (2, 1)}. R3:{(1,1) ,(1, 2), (1, 4), (2, 1), (2, 2), (3, 3) ,(4, 1), (4, 4)}. R4:{(2, 1), (3, 1), (3, 2), (4, 1) ,(4, 2), (4, 3)}. R5:{(1,1) ,(1, 2), (1, 3), (1, 4), (2, 2), (2, 3) ,(2, 4), (3, 3), (3, 4), (4, 4)}. R6:{ (3, 4)}.

Properties of Relations Definition: R is transitive iff "x"y"z [ < x, y >Î R Ù < y, z >Î R ® < x,z > Î R ] Note: if there is an arc from x to y and one from y to z then there must be one from x to z. This is the most difficult one to check. We will develop algorithms to check this later. Example 13: Which of the relations in Example 7 are transitive? R1:{(1,1) ,(1, 2), (2, 1), (2, 2), (3, 4), (4, 1) ,(4, 4)}. R2: {(1,1) ,(1, 2), (2, 1)}. R3:{(1,1) ,(1, 2), (1, 4), (2, 1), (2, 2), (3, 3) ,(4, 1), (4, 4)}. R4:{(2, 1), (3, 1), (3, 2), (4, 1) ,(4, 2), (4, 3)}. R5:{(1,1) ,(1, 2), (1, 3), (1, 4), (2, 2), (2, 3) ,(2, 4), (3, 3), (3, 4), (4,4)}. R6:{ (3, 4)}.

Properties of Relations Example: A: not reflexive symmetric antisymmetric transitive B: not reflexive not symmetric not antisymmetric not transitive D: not reflexive not symmetric antisymmetric transitive C: not reflexive not symmetric antisymmetric not transitive

Combining Relations A very large set of potential questions - Let R1 and R2 be binary relations on a set A: If R1 has property 1 and R2 has property 2, does R1 * R2 have property 3 where * represents an arbitrary binary set operation?

Combining Relations Example: If R1 is symmetric , and R2 is antisymmetric, does it follow that, R1∪R2 is transitive? If so, prove it. Otherwise find a counterexample. Example : Let R1 and R2 be transitive on A. Does it follow that R1 ∪ R2 is transitive?

Composition Definition: Suppose R1 is a relation from A to B R2 is a relation from B to C. Then the composition of R2 with R1, denoted R2。R1 is the relation from A to C: If <x. y> is a member of R1 and <y, z> is a member of R2 then <x, z> is a member of R2。R1. Note: For <x, z> to be in the composite relation R2。R1 there must exist a y in B . . . . Note: We read them right to left as in functions.

Composition Example: Example 20: What is the composite of the relations R and S, where R is the relation form {1, 2, 3} to {1, 2, 3, 4} with R={(1, 1), (1, 4), (2, 3), (3, 1), (3, 4)} and S is the relation from {1, 2, 3, 4} to {0, 1, 2} with S={(1, 0), (2, 0), (3, 1), (3, 2), (4,1)}?

Composition Definition: Let R be a binary relation on A. Then Basis: R1 = R Induction: Rn + 1= Rn。R Note: an ordered pair <x, y> is in Rn iff there is a path of length n from x to y following the arcs (in the direction of the arrows) of R.

Composition Example :

Composition Theorem: R is transitive iff Rn Í R for all n > 0 .