Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 2 Equivalence Relations Reading: Epp Chp 10.3.

Similar presentations


Presentation on theme: "1 Lecture 2 Equivalence Relations Reading: Epp Chp 10.3."— Presentation transcript:

1 1 Lecture 2 Equivalence Relations Reading: Epp Chp 10.3

2 2 Overview – Equivalence Relations 1.Revision 2.Definition of an Equivalence Relation 3.Examples (and non-examples) 4.Visualization Tool 5.FromEquivalence Relations toEquivalence Classes toPartitions 6.FromPartitions toEquivalence Relations 7.Another Example

3 3 1. Revision Concrete World Abstract World a. ___ has been to ___ {John, Mary, Peter} {Tokyo, NY, HK}{(John,Tokyo), (John,NY), (Peter, NY)} b. ___ is in ___ {Tokyo, NY} {Japan, USA}{(Tokyo,Japan), (NY,USA)} c. ___ divides ___{1,2,3,4} {10,11,12} {(1,10),(1,11),(1,12), (2,10), (2,12),(3,12), (4,12)} d. ___ less than ___ {1,2,3} {(1,2),(1,3),(2,3)} ___ R ___ AB R  A  BR  A  B Q: What can you do with relations? A: (1) Set Operations; (2) Complement; (3) Inverse; (4) Composition Q: What happens if A = B ? Relation R from A to B

4 4 1. Revision Concrete World a. ___ same age as ___ {John, Mary, Peter} {(John,John), (Mary,Mary) (Peter,Peter), (Mary,Peter), (Peter,Mary)} b. ___ same # of elements as ___ { {}, {1}, {2}, {3.4} } { ({},{}), ({1},{1}), ({2},{2}) ({3,4},{3,4}) ({1},{2}), ({2},{1}) c. ___  ___ { {}, {1}, {2}, {1,2} } { ({},{}), ({},{1}), ({},{2}), ({},{1,2}), ({1},{1}), ({1},{1,2}), ({2},{2}), ({2},{1,2}) ({1,2},{1,2}) } d. ___  ___ {1,2,3} {(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)} ___ R ___ A R  A2R  A2 Relation R on A “Everyone is related to himself” “If x is related to y and y is related to z, then x is related to z.” Reflexive Transitive “If x is related to y, then y is related to x ” “If x is related to y and y is related to x, then x = y.” Symmetric Anti-Symmetric

5 5 1. Revision n Given a relation R on a set A, –R is reflexive iff  x  A, x R x –R is symmetric iff  x,y  A, x R y  y R x –R is anti-symmetric iff  x,y  A, x R y  y R x  x=y –R is transitive iff  x,y  A, x R y  y R z  x R z

6 6 Overview – Equivalence Relations 1.Revision 2.Definition of an Equivalence Relation 3.Examples (and non-examples) 4.Visualization Tool 5.FromEquivalence Relations toEquivalence Classes toPartitions 6.FromPartitions toEquivalence Relations 7.Another Example

7 7 2. Definition n Given a relation R on a set A, –R is an equivalence relation iff R is reflexive, symmetric and transitive. (Today’s Lecture) –R is a partial order iff R is reflexive, anti-symmetric and transitive. (Next Lectures)

8 8 2. Definition n Given a relation R on a set A, –R is an equivalence relation iff R is reflexive, symmetric and transitive. n Q: How do I check whether a relation is an equivalence relation? n A: Just check whether it is reflexive, symmetric and transitive. (Always go back to the definition.) n Q: How do I check whether a relation is reflexive, symmetric and transitive? n A: Again, go back to the definitions of reflexive, symmetric and transitive. (Previous Lecture)

9 9 3 Examples (EqRel in life) 3.1 Let S be the set of all second year students. Define a relation C on S such that x C y iff x and y take at least 1 course in common Q1: Is C reflexive? (  x  S, x C x) ??? Yes. Q2: Is C symmetric? (  x,y  S, x C y  y C x) ??? Yes. Q3: Is C transitive? (  x,y  S, x C y  y C z  x C z) ??? NO!!! Therefore C is NOT an equivalence relation.

10 10 3 Examples (EqRel in life) 3.2 Let S be the set of all second year students. Define a relation N on S such that x N y iff x and y take NO courses in common Q1: Is N reflexive? (  x  S, x N x) ??? NO!!!. Q2: Is N symmetric? (  x,y  S, x N y  y N x) ??? Yes. Q3: Is N transitive? (  x,y  S, x N y  y N z  x N z) ??? NO!!! Therefore N is NOT an equivalence relation.

11 11 3 Examples (EqRel in life) 3.3 Let S be the set of all people this room. Define a relation T on S such that x T y iff x is of equal or taller height than y Q1: Is T reflexive? (  x  S, x T x) ??? Yes. Q2: Is T symmetric? (  x,y  S, x T y  y T x) ??? NO!!! Q3: Is T transitive? (  x,y  S, x T y  y T z  x T z) ??? Yes. Therefore T is NOT an equivalence relation.

12 12 3 Examples (EqRel in life) 3.4 Let S be the set of all people in this room. Define a relation M on S such that x M y iff x is born in the same month as y Q1: Is M reflexive? (  x  S, x M x) ??? Yes. Q2: Is M symmetric? (  x,y  S, x M y  y M x) ??? Yes. Q3: Is M transitive? (  x,y  S, x M y  y M z  x M z) ??? Yes. Therefore M is an equivalence relation.

13 13 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q1: Is R reflexive? Reflexive :  x  A, x R x (Always go back to the definition) n Yes!

14 14 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q2: Is R symmetric? Symmetric :  x,y  A, x R y  y R x (Always go back to the definition)

15 15 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q2: Is R symmetric? Symmetric :  x,y  A, x R y  y R x (Always go back to the definition)

16 16 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q2: Is R symmetric? Symmetric :  x,y  A, x R y  y R x (Always go back to the definition)

17 17 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q2: Is R symmetric? Symmetric :  x,y  A, x R y  y R x (Always go back to the definition)

18 18 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q2: Is R symmetric? Symmetric :  x,y  A, x R y  y R x (Always go back to the definition)

19 19 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q2: Is R symmetric? Symmetric :  x,y  A, x R y  y R x (Always go back to the definition) n Yes, R is symmetric.

20 20 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q3: Is R transitive? Transitive :  x,y  A, x R y  y R z  x R z (Always go back to the definition)

21 21 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q3: Is R transitive? Transitive :  x,y  A, x R y  y R z  x R z (Always go back to the definition)

22 22 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q3: Is R transitive? Transitive :  x,y  A, x R y  y R z  x R z (Always go back to the definition)

23 23 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q3: Is R transitive? Transitive :  x,y  A, x R y  y R z  x R z (Always go back to the definition)

24 24 3 Examples (Finite Eq Rels) 3.5 Let A = {0,1,2,3,4} Let R = {(0,0), (0,4), (1,1), (1,3), (2,2), (4,0), (3,3), (3,1), (4,4)} Is R an equivalence relation? Q3: Is R transitive? Transitive :  x,y  A, x R y  y R z  x R z (Always go back to the definition) n Carry on with checking … n Yes, R is transitive.


Download ppt "1 Lecture 2 Equivalence Relations Reading: Epp Chp 10.3."

Similar presentations


Ads by Google