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.

Slides:



Advertisements
Similar presentations
Reflexive example: AB = AB Symmetric example: AB = BA
Advertisements

Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Basic Properties of Relations
Relations.
Discrete Mathematics Lecture # 16 Inverse of Relations.
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.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
1 Representing Relations Part 2: directed graphs.
Relations Chapter 9.
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.
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∩
1 Relations and Their Properties Epp, section ??? CS 202 Aaron Bloomfield.
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.
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.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
Sets, Relations, and Lattices
CS 103 Discrete Structures Lecture 19 Relations. Chapter 9.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
Discrete Structures – CNS2300
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.
UNIT - 2.  A binary operation on a set combines two elements of the set to produce another element of the set. a*b  G,  a, b  G e.g. +, -, ,  are.
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,
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
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.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
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.
The Relation Induced by a Partition
Relations and Their Properties
Citra Noviyasari, S.Si, MT
Relations and Their Properties
Relations Chapter 9.
Applied Discrete Mathematics Week 10: Relations
Representing Relations
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Dr. Ameria Eldosoky Discrete mathematics
Reflexivity, Symmetry, and Transitivity
Relations and Their Properties
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
8.5 Equivalence Relations
Relations and Their Properties
8.1 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
Lecture 4.1: Relations Basics
Discrete Math (2) Haiming Chen Associate Professor, PhD
9.5 Equivalence Relations
Equivalence Relations
Equivalence Relations
Basics of Relations.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Agenda Lecture Content: Relations (Relasi)
Lecture # 16 Inverse of Relations
Presentation transcript:

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 of 2 sets Formal definition: –Let A and B be sets –A binary relation from A to B is a subset of AxB (Cartesian product)

3 Suppose a  A and b  B If (a,b)  R, then aRb If (a,b)  R, then aRb If aRb, we can state that a is related to b by R Denotation of binary relation R

4 Example 1 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 We can state that, for instance, 0Ra and 1Rb We can represent relations graphically, as shown on the next slide

5 Example 1 A = {0,1,2} B = {a,b} R = {(0,a), (0,b), (1,a), (2,b)} 0a1b20a1b2 Rab0xx1x2xRab0xx1x2x

6 Functions as relations A function f from set A to set B assigns a unique 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) The graph of f is a subset of AxB, so it is a relation from A to B

7 Functions as relations The graph of f has the property that every element of A is the first element of exactly one ordered pair of the graph If R is a relation from A to B such that every element is the first element of exactly one ordered pair of R, then a function can be defined with R as its graph

8 Not all relations are functions A relation can express a one-to-many relationship between elements of sets A and B, where an element of A may be related to several elements of B On the other hand, a function represents a relation in which exactly one element of B is related to each element of A

9 Relations on a set A relation on a set A is a relation from A to A; in other words, a subset of AxA Example: Let A = {1,2,3,4,5,6}; which ordered pairs are in the relation R={(a,b)|a divides b}? Solution: {(1,1) (1,2), (1,3), (1,4), (1,5), (1,6), (2,2), (2,4), (2,6), (3,3), (3,6), (4,4), (5,5), 6,6)}

10 Relations on the set of integers Relations on the set of integers are infinite relations Some examples include: R 1 = {(a,b) | a = b} R 2 = {(a,b) | a = 5b} R 3 = {(a,b) | a = b+2}

11 Finding the number of relations on a finite set A relation on a set A is a subset of AxA If A has n elements, AxA has n 2 elements A set with m elements has 2 m subsets Therefore, there are 2 n 2 relations on a set with n elements For set {a,b,c,d} there are 2 16, or 65,536 relations on the set

12 Properties of relations Reflexive: a relation R on set A is reflexive if (a,a)  R for every element a  A For example, for set A = {1,2,3} –if R = {(1,1), (1,2), (2,2), (3,1), (3,3)} then R is a reflexive relation –On the other hand, if R = {(1,1), (1,2), (2,3), (3,3)} then R is not a reflexive relation

13 Properties of relations Symmetric: a relation R on a set A is symmetric if (b,a)  R whenever (a,b)  R for all a,b  A For set A = {a,b,c,d}: –if R = {(a,b), (b,a), (c,d), (d,c)} then R is symmetric –if R = {(a,b), (b,a), (c,d), (c,b)} then R is not symmetric

14 Properties of relations Antisymmetric: a relation R on a set A is antisymmetric if (a,b)  R and (b,a)  R only when a=b Note that symmetric and antisymmetric are not necessarily opposite; a relation can be both at the same time

15 Examples of symmetry and antisymmetry For A={1,2,3}: –R = {(1,1), (1,2), (2,1)} is symmetric but not antisymmetric –R = {(1,1), (1,2), (2,3)} is antisymmetric but not symmetric –R = {} is both symmetric and antisymmetric –R = {(1,2), (1,3), (2,3)} is antisymmetric

16 Properties of relations Transitive: A relation R on a set A is called transitive if, whenever (a,b)  R and (b,c)  R, then (a,c)  R for a,b,c  A For set A = {1, 2, 3, 4}: –R = {(1,3), (3,4), (1,2), (2,3), (2,4), (1,4)} is transitive –R = {(1,3), (3,4), (1,2), (2,4)} is not transitive

17 Example 2 Let A = set of integers and –R 1 = {(a,b) | a  b} –R 2 = {(a,b) | a<b} –R 3 = {(a,b) | a=b or a=-b} –R 4 = {(a,b) | a=b} –R 5 = {(a,b) | a=b+1} –R 6 = {(a,b) | a+b  2} Which of these are reflexive, symmetric, antisymmetric, transitive?

18 Combining relations Since relations from A to B are subsets of AxB, relations from A to B can be combined any way 2 sets can be combined Let A={1,2,3} and B={1,2,3,4} and R 1 ={(1,1), (2,2), (3,3)}, R 2 ={(1,1),(1,2),(1,3),(1,4)} –R1  R2 = {(1,1), (1,2), (2,2), (1,3),(3,3), (1,4)} –R1  R2 = {(1,1)} –R1 - R2 = {(2,2), (3,3)} –R2 - R1 = {(1,2), (1,3), (1,4)}

19 Composition of relations Let R be a relation from A to B and S be a relation from B to C S R is the relation consisting of ordered pairs (a,c) where a  A and c  C and there exists an element b  B such that (a,b)  R and (b,c)  S