8.1 Relations and Their Properties

Slides:



Advertisements
Similar presentations
Basic Properties of Relations
Advertisements

Relations.
Discrete Mathematics Lecture # 16 Inverse of Relations.
Ch. 8: Relations 8.1 Relations and their Properties.
Relations & Their Properties. Copyright © Peter Cappello2 Introduction Let A & B be sets. A binary relation from A to B is a subset of A x B. Let R be.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1.
Discrete Mathematics Lecture#11.
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.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
Relation. Relations Recall the definition of the Cartesian (Cross) Product: The Cartesian Product of sets A and B, A x B, is the set A x B = { : x  A.
1 Relations and Their Properties Epp, section ??? CS 202 Aaron Bloomfield.
Relations (1) Rosen 6 th ed., ch. 8. Binary Relations Let A, B be any two sets. A binary relation R from A to B, written (with signature) R:A↔B, is a.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a Fall 2002KSU - Discrete Structures1.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
1 Relations Rosen 6 th ed., § Relations Re lationships between elements of sets occur in many contextsRe lationships between elements of sets occur.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit Unit 04 Relations IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP1 Unit 4 Relations.
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.
Properties and Mental Computation p. 80. Math talk What are some math properties that we use? Why do you think we have them? Do you ever use them?
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
CS 103 Discrete Structures Lecture 19 Relations. Chapter 9.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
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.
Chapter 8 Equivalence Relations Let A and B be two sets. A relation R from A to B is a subset of AXB. That is, R is a set of ordered pairs, where the first.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
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.
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), (
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
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.
Lecture 7: Relations Dr Andrew Purkiss-Trew Cancer Research UK Mathematics for Computing.
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.
Discrete Mathematical
Relations and Their Properties
Citra Noviyasari, S.Si, MT
Relations.
Relations and Their Properties
Partial Orderings CSE 2813 Discrete Structures.
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.
Applied Discrete Mathematics Week 10: Relations
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Dr. Ameria Eldosoky Discrete mathematics
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Relations and Their Properties
CSE 504 Discrete Structures & Foundations of Computer Science
Chapter 3 Relation and Function Homework 4 For each of the following relations on set A = { 1,2,3,4 }, check each of them whether they are reflexive, irreflexive,
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
Applied Discrete Mathematics Week 9: Equivalence Relations
Chapter 2 Sets Homework 3 Given U = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } as a set universe and the sets : A = { 1, 2, 3, 4, 5 }, B = { 4, 5, 6, 7 }, C = { 5,
8.5 Equivalence Relations
Relations and Their Properties
8.1 Relations and Their Properties
CSE15 Discrete Mathematics 04/26/17
Applied Discrete Mathematics Week 5: Boolean Algebra
Relations and their Properties
Introduction to Relations and Functions
Discrete Math (2) Haiming Chen Associate Professor, PhD
9.5 Equivalence Relations
Combining relations via relational composition
Basics of Relations.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Agenda Lecture Content: Relations (Relasi)
Lecture # 16 Inverse of Relations
Presentation transcript:

8.1 Relations and Their Properties

The Binary Relation DEFINITION 1 Let A and B be sets. A binary relation from A to B is a subset of A x B. In other words, a binary relation from A to B is a set R of ordered pairs where the first element of each ordered pair comes from A and the second element comes from B. We use the notation a R b to denote that (a, b)ϵR and a R b to denote that (a, b)ɇR. Moreover, when (a, b)belongs to R, a is said to be related to b by R.

Example: Let A={1,2,3} and B={4,5,6} Define R to be a relation from A to B such that: aRb ↔ a\b. Write the R as a set of ordered pairs then Find the domain and the range. Solution: R={(1,4), (1,5), (1,6), (2,4), (2,6), (3,6)} Domain is {1,2,3} & Range is {4,5,6}

EXAMPLE 3 Let A = {0,1 ,2} and B = {a,b} EXAMPLE 3 Let A = {0,1 ,2} and B = {a,b} . Then {(0,a), (0,b), (1,a), (2,b)} is a relation from A to B . This means, for instance, that 0Ra , but that 1Rb.

Functions as Relations Recall that a function f from a set A to a set B (as defined in Section 2.3) assigns exactly one element of B to each element of A . The graph of f is the set of ordered pairs (a,b) such that b = f(a). Because the graph of f is a subset of A x B, it is a relation from A to B.

Relations on a Set DEFINITION 2 A relation on the set A is a relation from A to A . In other words, a relation on a set A is a subset of A x A .

EXAMPLE 4 Let A be the set {1,2,3,4} EXAMPLE 4 Let A be the set {1,2,3,4}. Which ordered pairs are in the relation R = {(a,b) | a divides b}? Solution: Because (a,b) is in R if and only if a and b are positive integers not exceeding 4 such that a divides b, we see that R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4) } .

R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4) } . Graphically A loop: a raw from an element to itself 3

Properties of Relations

Reflexive & irreflexive DEFINITION 3 A relation R on a set A is called reflexive if (a,a)ϵR for every element aϵA. We see that a relation on A is reflexive if every element of A is related to itself. A relation R on the set A is irreflexive if for every a ϵ A , (a,a) ɇ R. That is, R is irreflexive if no element in A is related to itself.

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)} , R 6 = {(3,4)} . Which of these relations are reflexive?

Solution: The relations R3 and R5 are reflexive because they both contain all pairs of the form (a ,a), namely, (1,1), (2,2), (3,3), and (4,4). The other relations are not reflexive because they do not contain all of these ordered pairs. In particular, R1, R2 , R4, and R6 are not reflexive because (3,3) is not in any of these relations.

Symmetric & Antisymmetric DEFINITION 4 A relation R on a set A is called symmetric if (b,a) ϵ R whenever (a,b) ϵ R, for all a,bϵA . A relation R on a set A such that for all a,bϵA , if (a,b) ϵ R and (b,a) ϵ R, then a=b is called antisymmetric.

EXAMPLE 10 Which of the relations from Example 7 are symmetric and which are antisymmetric?

Solution: The relations R2 and R3 are symmetric, because in each case (b,a) belongs to the relation whenever (a,b) does. For R2 , the only thing to check is that both (2,1) and (1,2) are in the relation. For R3 , it is necessary to check that both (1,2) and (2,1) belong to the relation, and (1,4) and (4,1) belong to the relation. The reader should verify that none of the other relations is symmetric. This is done by finding a pair (a,b) such that it is in the relation but (b,a) is not. R4, R5 , and R6 are all antisymmetric. For each of these relations there is no pair of elements a and b with a ≠b such that both (a,b) and (b,a) belong to the relation. The reader should verify that none of the other relations is antisymmetric. This is done by finding a pair (a,b) with a ≠b such that (a,b) and (b,a) are both in the relation.

:Remark1 The relation R is connected if for each a,bϵA, where a≠b, either aRb or bRa. OR if for each a,bϵR a≠b aRb or bRa even for a=b (for example, the relation <). Inverse relation: Complementary relation:

Example: A={1,2,3} and R={(1,2),(1,3),(2,2),(3,2)} R-1 ={(2,1),(3,1),(2,2),(2,3)} = {(1,1), (3,3),(2,1),(3,1),(2,3)}

Transitive DEFINITION 5 A relation R on a set A is called transitive if whenever (a,b)ϵR and (b,c)ϵ R , then (a,c) ϵ R , for all a,b,c ϵA.

EXAMPLE 13 Which of the relations in Example 7 are transitive? Solution: R4 , R5 , and R6 are transitive. For each of these relations, we can show that it is transitive by verifying that if (a,b) and (b,c) belong to this relation, then (a,c) also does. For instance, R4 is transitive, because (3,2) and (2,1), (4,2) and (2,1), (4,3) and (3,1), and (4,3) and (3,2) are the only such sets of pairs, and (3,1), (4,1), and (4,2) belong to R4 • The reader should verify that R5 and R6 are transitive. R1is not transitive because (3,4) and (4,1) belong to R1, but (3,1) does not. R2 is not transitive because (2,1) and (1,2) belong to R2 , but (2 ,2) does not. R3 is not transitive because(4,1) and (1,2) belong to R3 , but (4,2) does not.

Combining Relations Because relations from A to B are subsets of AxB, two relations from A to B can be combined in any way, two sets can be combined. EXAMPLE 1 7 Let A = {1,2,3} and B = {1,2,3,4} . The relations R1= {(1,1), (2,2), (3,3)} and R2 ={(1,1), (1,2), (1,3), (1,4)} can be combined to obtain R1U R2 = {(1,1) , (1,2), (1,3), (1,4) , (2,2), (3,3)} , R1∩ R2 = {(1,1)} , R 1 - R2 = {(2,2), (3,3) } , R2 - R 1 = { (1,2) , (1,3), (1,4)} .

The composition of two relations Let R be a relation from a set A to a set B and S a relation from B to a set C. The composite of R and S is the relation consisting of ordered pairs (a,c), where aϵA, cϵC , and for which there exists an element bϵB such that (a,b)ϵR and (b,c) ϵ S. We denote the composite of R and S by S◦R.

EXAMPLE 20 What is the composite of the relations R and S, where R is the relation from {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)}? Solution: S ◦ R is constructed using all ordered pairs in R and ordered pairs in S, where the second element of the ordered pair in R agrees with the first element of the ordered pair in S. For example, the ordered pairs (2,3) in R and (3,1) in S produce the ordered pair (2,1 ) in S ◦ R. Computing all the ordered pairs in the composite, we find S ◦ R = {(1, 0), (1,1) , (2,1) , (2,2), (3,0), (3,1) } .

Homework Page 527 1 (a,b,c) 3 (a,b,c,d,e,f) 24 (a,b) 25 (a,b) 30