Equivalence Relations and Classes - PowerPoint PPT Presentation

About This Presentation
Title:

Equivalence Relations and Classes

Description:

Title: No Slide Title Author: Patrick Prosser Last modified by: Patrick Prosser Created Date: 12/15/2000 11:46:13 AM Document presentation format – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 26
Provided by: Patrick620
Category:

less

Transcript and Presenter's Notes

Title: Equivalence Relations and Classes


1
Equivalence Relations and Classes
2
Equivalence Relations
Definition
A relation R on a set A is called an equivalence
relation if it is reflexive, symmetric, and
transitive.
3
Equivalence Relations
What is it?
An example
Let R be a relation on the set of people, such
that (x,y) is in R if x and y are the same age in
years.
  • R is reflexive
  • you are the same age as yourself
  • R is symmetric
  • if x is same age as y then y is same age as x
  • R is transitive
  • if (x,y) and (y,z) are in R then (x,z) is in R

4
Equivalent Elements
Definition
Two elements related by an equivalence relation
are said to be equivalent
5
Equivalence Relations
Example
Which of the following are equivalence
relations, on the set of people?
  • R1 (a,b) a and b have same parents
  • R2 (a,b) a and b have met
  • R3 (a,b) a and b speak a common language

6
Equivalence Relations
Example
  • Establish if
  • reflexive, i.e. (a,a) is in r
  • symmetric, i.e. (a,b) and (b,a) are in r
  • transitive, i.e (a,b) and (b,c) therefore (a,c)
  • R1 (a,b a and b have same parents
  • reflexive? symmetric? transitive?
  • R2 (a,b) a and b have met
  • transitive?
  • R3 (a,b) a and b speak a common language
  • transitive?

7
Equivalence Relations
Example
Is R an equivalence relation?
8
Equivalence Relations
Example
9
Equivalence Relations
Example
10
Equivalence Relations
Example
11
Equivalence Class
Definition
Let R be an equivalence relation on the set A.
The set of all elements of A related to the
element x, also in A, are called the equivalence
class of a.
The equivalence class of a with respect to R
I.e. all elements related to a.
12
Equivalence Classes
Example
What are the equivalence classes of 0 and 1 for
congruence modulo 4?
13
Example
What are the equivalence classes of 0 and 1 for
congruence modulo 4?
14
Equivalence Classes and Partitions
The equivalence classes of an equivalence
relation partition a set into non-empty disjoint
subsets
Let R be an equivalence relation on the set A
Proof page 411
15
Example
Show that relation R consisting of pairs (x,y)
is an equivalence relation, where x and y are bit
strings and (x,y) is in R if their first 3 bits
are equal
  • (x,y) is in R if
  • length(x) gt 2 and length(y) gt 2
  • first3bits(x) first3bits(y)
  • R is reflexive
  • why?
  • R is symmetric
  • why?
  • R is transitive
  • why?
  • Consequently R is an equivalence relation

16
Example
The pair ((a,b),(c,d)) is in R if ad bc, where
a, b, c, and d are integers. Show that R is an
equivalence relation.
  • R is reflexive
  • ((a,b),(a,b)) is in R because ab ba
  • R is symmetric
  • ((a,b),(c,d)) therefore ((c,d),(a,b))
  • ad bc therefore cb da
  • R is transitive
  • ((a,b),(c,d)) and ((c,d),(e,f)) -gt ((a,b),(e,f))
  • af be
  • ad bc therefore a bc/d
  • cf de therefore f de/c
  • af bc/d x de/c be
  • Consequently R is an equivalence relation

17
1. What is the equivalence class of (1,2) with
respect to the equivalence relation
(a,b)R(c,d) if ad bc 2. What does
(a,b)R(c,d) if ad bc mean?
1. (1,2)R(c,d) if 1d 2c. The equivalence class
is then the set of ordered pairs (c,d) such
that d 2c
2. R defines the set of rational numbers!
18
Hey! This has got to be easier.
19
Equivalence Relation
Three ways we can look at it
  • A set of tuples
  • A connection matrix
  • A digraph

20
Equivalence Relation
Reflexive
  • A set of tuples
  • (a,a) is in R
  • A connection matrix
  • diagonal is all 1s
  • A digraph
  • loops on nodes

21
Equivalence Relation
Symmetric
  • A set of tuples
  • (a,b) and (b,a) are in R
  • A connection matrix
  • symmetric across diagonal
  • A digraph
  • double edges

22
Equivalence Relation
Transitive
  • A set of tuples
  • if (a,b) and (b,c) are in R
  • then (a,c) is in R
  • A connection matrix
  • ?
  • A digraph
  • triangles, ultimately a clique!

23
Equivalence Relation
Example
R (a,b),(a,c),(b,a),(b,c),(c,a),(c,b),(d,e),(d,
f),(d,g), (e,d),(e,f),(e,g),(f,d),(f,e),(f,
g),(g,d),(g,e),(g,f), (a,a),(b,b),(c,c),(d,
d),(e,e),(f,f),(g,g)
24
Equivalence Class
Example
d d,e,f,g e d,e,f,g f
d,e,f,g g d,e,f,g
a a,b,c b a,b,c c a,b,c
25
Equivalence Relations and Classes
Write a Comment
User Comments (0)
About PowerShow.com