Download presentation
Presentation is loading. Please wait.
1
Equivalence Relations
A relation on set A is called an equivalence relation if it is: reflexive, symmetric, and Transitive We use the notation a b
2
Example Let R be a relation on set A, where A = {1, 2, 3, 4, 5} and R = {(1,1), (2,2), (3,3), (4,4), (5,5), (1,3), (3,1)} Is R an equivalence relation?
3
Another example: Let A={set of lines } and R is a relation R={(L1,L2):L1 is parallel to L2}
4
Representing Relations Using Matrices
Let R be a relation from A to B A = {a1, a2, … } B = {b1, b2, … } The zero-one matrix representing the relation R has a 1 as its entry when ai is related to bj and a 0 in this position if ai is not related to bj.
5
Example Let R be a relation from A to B A={a, b, c} B={d, e}
R={(a, d), (b, e), (c, d)} Find the relation matrix for R
6
Relation Matrix Let R be a relation from A to B A={a, b, c} B={d, e}
R={(a, d), (b, e), (c, d)} Note that A is represented by the rows and B by the columns in the matrix. Cellij in the matrix contains a 1 iff ai is related to bj.
7
Relation Matrices and Properties
Let R be a binary relation on a set A and let M be the zero-one matrix for R. R is reflexive iff Mii = 1 for all i R is symmetric iff M is a symmetric matrix
8
Relation Matrices and Properties
9
Example Suppose that the relation R on a set is represented by the matrix MR. ú û ù ê ë é = 1 R M Is R reflexive and symmetric?
10
Example Is R reflexive? Is R symmetric? ú û ù ê ë é = 1 M
R M Is R reflexive? Is R symmetric? All the diagonal elements = 1, so R is reflexive. The lower left triangle of the matrix = the upper right triangle, so R is symmetric.
11
Let A={a1,a2,a3} and B={b1,b2,b3,b4,b5} which ordered pairs are in the relation R represented by the matrix ??
12
intersection union
13
Find the union and intersection of zero_one matrices
The intersection The union
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.