Equivalence Relations and Classes

Slides:



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

Equivalence Relations
Equivalence Relations
Equivalence Relations
Chapter 3 Relations. Section 3.1 Relations and Digraphs.
Verifying Segment Relations
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Basic Properties of Relations
Representing Relations Using Matrices
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?
1 Representing Relations Part 2: directed graphs.
Equivalence Relations: Selected Exercises
Equivalence Relations. Fractions vs. Rationals Question: Are 1/2, 2/4, 3/6, 4/8, 5/10, … the same or different? Answer: They are different symbols that.
Reflexive -- First sentence of proof is: (1) Let x  Z (2) Let (x,x)  R. (3) Let (x,x)  I (4) Let x  R.
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.
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
Equivalence Relations MSU CSE 260. Outline Introduction Equivalence Relations –Definition, Examples Equivalence Classes –Definition Equivalence Classes.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Discrete Math for CS 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.
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.
Language: Set of Strings
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
A Quick Math Overview (not the last one!) Section 1.4, you should it read carefully! Reading the corresponding material from the book is strongly encouraged.
Sets, Relations, and Lattices
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
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 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.
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.
Chap. 7 Relations: The Second Time Around
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
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), (
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
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.
Chapter8 Relations 8.1: Relations and their properties.
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.
Equivalence Relations: Selected Exercises
The Relation Induced by a Partition
Relations and Their Properties
Relations.
Partial Orders.
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
Equivalence Relations
Relations Chapter 9.
Representing Relations
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
CSE373: Data Structures & Algorithms Lecture 10: Disjoint Sets and the Union-Find ADT Linda Shapiro Spring 2016.
تصنيف التفاعلات الكيميائية
8.5 Equivalence Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Relations and their Properties
4.5 Equivalence Relations
9.5 Equivalence Relations
Equivalence Relations
Equivalence Relations
Basics of Relations.
Clements MAΘ October 30th, 2014
Equivalence Relations: Selected Exercises
Closures of Relations Epp, section 10.1,10.2 CS 202.
Chapter 8 (Part 2): Relations
Section 3.2 More set operations.
4.4 Properties of Relations
Presentation transcript:

Equivalence Relations and Classes

Equivalence Relations Definition A relation R on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive.

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

Equivalent Elements Definition Two elements related by an equivalence relation are said to be equivalent

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}

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}

Equivalence Relations Example Is R an equivalence relation?

Equivalence Relations Example

Equivalence Relations Example

Equivalence Relations Example

Let R be an equivalence relation on the set A. The set of 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.

Equivalence Classes Example What are the equivalence classes of 0 and 1 for congruence modulo 4?

Example What are the equivalence classes of 0 and 1 for congruence modulo 4?

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

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) > 2 and length(y) > 2 first3bits(x) = first3bits(y) R is reflexive why? R is symmetric R is transitive Consequently R is an equivalence relation

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)) -> ((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

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!

Hey! This has got to be easier.

Equivalence Relation Three ways we can look at it A set of tuples A connection matrix A digraph

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

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 a b

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! a b c a b c

Equivalence Relation Example a b c d g e f 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)}

Equivalence Class Example a b c d g e f [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}

Equivalence Relations and Classes