Discrete Math (2) Haiming Chen Associate Professor, PhD

Slides:



Advertisements
Similar presentations
Equivalence Relations
Advertisements

Section 7.5: Equivalence Relations Def: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive. Ex: Let.
Equivalence Relations
Equivalence Relations
Lecture 1 RMIT University, Taylor's University Learning Objectives
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Relations.
Representing Relations Using Matrices
Applied Discrete Mathematics Week 11: Graphs
CS2210(22C:19) Discrete Structures Relations Spring 2015 Sukumar Ghosh.
CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1.
Congruence of Integers
Equivalence Relations: Selected Exercises
Relations Chapter 9.
Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.
Equivalence Relations MSU CSE 260. Outline Introduction Equivalence Relations –Definition, Examples Equivalence Classes –Definition Equivalence Classes.
CS Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, 9:30-11:30a Fall 2002KSU - Discrete Structures1.
Ordered Sets. Relations. Equivalence Relations 1.
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.
2.6 Equivalence Relation §1.Equivalence relation §Definition 2.18: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric,
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.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Structures1 You Never Escape Your… Relations.
Rosen, Section 8.5 Equivalence Relations
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Fall 2002CMSC Discrete Structures1 You Never Escape Your… Relations.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
8.5 Equivalence Relations
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.
Lecture 4.4: Equivalence Classes and Partially Ordered Sets CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 7 Relations.
Chapter8 Relations 8.1: Relations and their properties.
Equivalence Relations and Classes
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
Representing Relations Using Digraphs
Discrete Mathematical
Relations and Their Properties
Citra Noviyasari, S.Si, MT
Relations.
CSE15 Discrete Mathematics 05/03/17
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.
RELATION KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS )
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 9 Relations Slides are adopted from.
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Math (2) Haiming Chen Associate Professor, PhD
CS2210 Discrete Structures Relations
8.5 Equivalence Relations
Equivalence Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
8.5 Equivalence Relations and 8.6 Partial Ordering
Relations and Digraphs
Applied Discrete Mathematics Week 6: Relations/Digraphs
Equivalence Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
9.5 Equivalence Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Equivalence relations
Equivalence Relations
Equivalence Relations
Rayat Shikshan Sanstha’s S.M.Joshi College, Hadapsar -28
Equivalence Relations: Selected Exercises
Chapter 8 (Part 2): Relations
Presentation transcript:

Discrete Math (2) Haiming Chen Associate Professor, PhD Department of Computer Science, Ningbo University http://www.chenhaiming.cn

Content Equivalence Relations Equivalence Classes Partitions

Equivalence Relations A relation R on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive. if (a,b)∈R or a R b, a and b are equivalent, denoted as a ∽ b Every element should be equivalent to itself

Example 1 Let R be the relation on the set of integers such that aRb if and only if a = b or a = −b. Equivalence relation or not? Reflexive? Symmetric? Transitive?

Example 2 Let R be the relation on the set of real numbers such that aRb if and only if a − b is an integer. Is R an equivalence relation? Reflexive? a −a = 0 is an integer Symmetric? a −b is an integer, so b−a is also an integer Transitive? a −b and b−c are integers, so a −c = (a −b) + (b−c) is also an integer

Example 3 Let m be an integer with m > 1. R = {(a, b) | a ≡ b (mod m)} on the set of integers Reflexive? a ≡ a (mod m) Symmetric? a − b = km, b − a = (−k)m, so b ≡ a (mod m) Transitive? a − b = km and b − c = lm, a − c = (a − b) + (b − c) = km + lm = (k + l)m Congruence Modulo m

Example 4 Suppose that R is the relation on the set of strings of English letters such that aRb if and only if l(a) = l(b), where l(x) is the length of the string x. Is R an equivalence relation?

Example 5 Let n be a positive integer and S a set of strings. Suppose that Rn is the relation on S such that sRnt if and only if s = t , or both s and t have at least n characters and the first n characters of s and t are the same. Reflexive? Symmetric? Transitive? In traditional C, only the first eight characters of a variable name are checked by the compiler

Example 6 the “divides” relation on the set of positive integers an equivalence relation. Let R be the relation on the set of real numbers such that xRy if and only if x and y are real numbers that differ by less than 1, that is |x − y| < 1. is not R is not an equivalence relation.

Content Equivalence Relations Equivalence Classes Partitions

Equivalence Classes The set of all elements that are related to an element a of A is called the equivalence class of a. The equivalence class of a with respect to R is denoted by [a]R. When only one relation is under consideration, we can write [a] for this equivalence class. If b ∈ [a]R, then b is called a representative of this equivalence class.

Example Let R be the relation on the set of integers such that aRb if and only if a = b or a = −b. [7] = {−7, 7}, [−5] = {−5, 5}, and [0] = {0}.

Example Let m be an integer with m > 1. R = {(a, b) | a ≡ b (mod m)}, m=4 [0] = {. . . ,−8,−4, 0, 4, 8, . . . }. [1] = {. . . ,−7,−3, 1, 5, 9, . . . }. [a]m = {. . . , a − 2m, a − m, a, a + m, a + 2m, . . .}.

Example Let n be a positive integer and S a set of strings. Suppose that Rn is the relation on S such that sRnt if and only if s = t , or both s and t have at least n characters and the first n characters of s and t are the same. n=3 [011]R3= {011, 0110, 0111, 01100, 01101, 01110, 01111, . . .}.

Content Equivalence Relations Equivalence Classes Partitions

Partitions Let A be the set of students at your school who are majoring in exactly one subject, and let R be the relation on A consisting of pairs (x, y), where x and y are students with the same major. [student1]Rcs={student1, student2, …studentm} [studentm+1]Ree={studentm+1, studentm+2, …studentn+m} [a] ≠ [b] [a] ∩ [b] = O

Partitions The union of the equivalence classes of R is all of A A= [student1]Rcs ∪[studentm+1] Ree Z= [0] m ∪ [1] m ∪ [2] m ∪…… ∪ [m-1]m a partition of a set S is a collection of disjoint nonempty subsets of S that have S as their union. equivalence classes form a partition of A an equivalence relation partitions a set

Partitions Conversely, every partition of a set can be used to form an equivalence relation.

Example 1 a partition A1 = {1, 2, 3}, A2 = {4, 5}, and A3 = {6} of S = {1, 2, 3, 4, 5, 6} What’s the equivalence relation R? (1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), and (3, 3) (4, 4), (4, 5), (5, 4), and (5, 5) (6, 6)

Example 2 What are the sets in the partition of the integers arising from congruence modulo 4?

Example 3 What are the sets in the partition of the set of all bit strings arising from the relation R3 on the set of all bit strings?

Homework Page 615, Ex.1, 47