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.

Slides:



Advertisements
Similar presentations
Partial Orderings Section 8.6.
Advertisements

Chapter 3. Relations Definitions Relations Binary relations Domain Range Vertex Direct edge Loops Reflective Relations Sympatric Relations Anti Symmetric.
Relations Relations on a Set. Properties of Relations.
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Discrete Mathematics Relations
April 9, 2015Applied Discrete Mathematics Week 9: Relations 1 Solving Recurrence Relations Another Example: Give an explicit formula for the Fibonacci.
Relations.
Discrete Mathematics Lecture # 16 Inverse of Relations.
Ch. 8: Relations 8.1 Relations and their Properties.
CSE115/ENGR160 Discrete Mathematics 04/24/12 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.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
1 Relations Rosen 6 th ed., § Relations Re lationships between elements of sets occur in many contextsRe lationships between elements of sets occur.
Unit Unit 04 Relations IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP1 Unit 4 Relations.
Relations and Their Properties
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.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
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)
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
Section 4.4 Properties of Relations. Order Relations Draw an arrow diagram for the relation R defined on the set {1,2,3,4} such that
CS 103 Discrete Structures Lecture 19 Relations. Chapter 9.
1 Partial Orderings Aaron Bloomfield CS 202 Epp, section ???
Equivalence Relations. Partial Ordering Relations 1.
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.
Lecture 4.1: Relations Basics CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
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,
Chapter Relations and Their Properties
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.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
1 Equivalence relations Binary relations: –Let S1 and S2 be two sets, and R be a (binary relation) from S1 to S2 –Not every x in S1 and y in S2 have such.
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.
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda.
MAT 2720 Discrete Mathematics Section 3.3 Relations
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.
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 is a relation on.
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.
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.
Lecture 4.1: Relations Basics
CS 173: Discrete Mathematical Structures
CSE 504 Discrete Structures & Foundations of Computer Science
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
Relations and Their Properties
8.1 Relations and Their Properties
8.1 Relations and Their Properties
CSE15 Discrete Mathematics 04/26/17
Lecture 4.1: Relations Basics
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
Basics of Relations.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Agenda Lecture Content: Relations (Relasi)
Section 3.2 More set operations.
Ø Let the universe set U={1,2,3,...,10}.
Presentation transcript:

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 and y  B}. A relation is just any subset of the CP!! R  AxB Ex: A = students; B = courses. R = {(a,b) | student a is enrolled in class b}

Example 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. Relations can be represented graphically, using arrows to represent ordered pairs. Another way to represent this relation is to use a table.

Relations Recall the definition of a function: f = { : b = f(a), a  A and b  B} Is every function a relation? A relation can be used to express a one-to-many relationship between the elements of the sets A and B where an element of A may be related to more than one element of B. A function represents a relation where exactly one element of B is related to each element of A. Yes, a function is a special kind of relation.

Example Let A be the set { l, 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) }.

Example Solution: The pair ( 1, 1 ) is in R 1, R 3, R 4, and R 6 ; ( 1, 2) is in R 1 and R 6 ; (2, 1 ) is in R 2, R 5, and R 6 ; ( 1, - 1 ) is in R 2, R 3, and R 6 ; and finally, (2, 2) is in R 1, R 3, and R 4

Example How many relations are there on a set with n elements? Solution: A relation on a set A is a subset of A x A. Because A x A has n 2 elements when A has n elements, and a set with m elements has 2 m subsets, there are 2 n2 subsets of A x A. Thus, there are 2 n2 relations on a set with n elements. For example, there are 2 32 = 2 9 = 512 relations on the set {a, b, c }.

Properties of a Relation

Example Which of the relations are reflexive? Solution: The reflexive relations are R 1,R 3, and R 4. For each of the other relations in this example it is easy to find a pair of the form (a, a) that is not in the relation.

Properties of a Relation

Example Which of the relations are symmetric and which are anti symmetric? 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, I ) belong to the relation, and ( 1, 4) and (4, 1 ) belong to the relation. R4, Rs, and R6 are all antisymmetric. For each of these relations there is no pair of elements a and b with a =1= b such that both (a, b) and (b, a) belong to the relation.

Example Which of the relations are symmetric and which are anti symmetric?

Properties of a Relation

Example