Discussion #27 Chapter 5, Sections 4.6-7 1/15 Discussion #27 Closures & Equivalence Relations.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Equivalence Relations
1 Chapter Equivalence, Order, and Inductive Proof.
Section 7.4: Closures of Relations Let R be a relation on a set A. We have talked about 6 properties that a relation on a set may or may not possess: reflexive,
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Basic Properties of Relations
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
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?
Chapter 3 Review MATH130 Heidi Burgiel. Relation A relation R from X to Y is any subset of X x Y The matrix of a Relation R is a matrix that has a 1 in.
CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1.
Regular Expression (EXTRA)
Relations binary relations xRy on sets x  X y  Y R  X  Y Example: “less than” relation from A={0,1,2} to B={1,2,3} use traditional notation 0 < 1,
Discussion #26 Chapter 5, Sections /15 Discussion #26 Binary Relations: Operations & Properties.
Equivalence Relations: Selected Exercises
Discrete Mathematics Lecture#11.
Relations Chapter 9.
Relations: Operations & Properties. Power Sets Set of all subsets of a set A. –A = {1,2} –P(A) = 2 A = { {}, {1}, {2}, {1,2} } We note that each element.
Exam 2 Review 8.2, 8.5, 8.6, Thm. 1 for 2 roots, Thm. 2 for 1 root Theorem 1: Let c 1, c 2 be elements of the real numbers. Suppose r 2 -c 1.
Exam 2 Review 7.5, 7.6, |A1  A2  A3| =∑|Ai| - ∑|Ai ∩ Aj| + |A1∩ A2 ∩ A3| |A1  A2  A3  A4| =∑|Ai| - ∑|Ai ∩ Aj| + ∑ |Ai∩ Aj ∩ Ak| - |A1∩
Properties of Relations In many applications to computer science and applied mathematics, we deal with relations on a set A rather than relations from.
Chapter 4 Relations and Digraphs
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.
INM175 Topic 7 1 Module INM175 Discrete Mathematics Topic 7 Set Theoretic Models.
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.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Rosen, Section 8.5 Equivalence Relations
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Reflexivity, Symmetry, and Transitivity Lecture 44 Section 10.2 Thu, Apr 7, 2005.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
CSNB143 – Discrete Structure Topic 7 – Relations Part II.
1 Discrete and Combinatorial Mathematics R. P. Grimaldi, 5 th edition, 2004 Chapter 5 Relations and Functions.
Problem Statement How do we represent relationship between two related elements ?
Chapter 8 Equivalence Relations Let A and B be two sets. A relation R from A to B is a subset of AXB. That is, R is a set of ordered pairs, where the first.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
UNIT - 2.  A binary operation on a set combines two elements of the set to produce another element of the set. a*b  G,  a, b  G e.g. +, -, ,  are.
Relations Section 9.1, 9.3—9.5 of Rosen Spring 2012
8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
8.5 Equivalence Relations
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
Equivalence Relations Lecture 45 Section 10.3 Fri, Apr 8, 2005.
Relations Compare with function – Function: Set of ordered pairs where x’s don’t repeat x’s come from domain; y’s come from co-domain Purpose: to transform.
Chap. 7 Relations: The Second Time Around
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), (
§R1∪R2§R1∪R2 §R 1 ∩R 2 R1-R2R1-R2 2.4 Operations on Relations.
Theory of Computing Topics Formal languages automata computability and related matters Purposes To know the foundations and principles of computer science.
Theory of Computing Topics Formal languages automata computability and related matters Purposes To know the foundations and principles of computer science.
1 Closures of Relations Based on Aaron Bloomfield Modified by Longin Jan Latecki Rosen, Section 8.4.
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
English for Economic Informatics I Tomáš Foltýnek Theoretical Foundations of Informatics.
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 Chapter 9.
Lecture # 14 Types of Relations
Relations: Operations & Properties
CSNB 143 Discrete Mathematical Structures
Lecture 4.3: Closures and Equivalence Relations
Chapter 2 Sets and Functions.
Equivalence Relations
Equivalence Relations: Selected Exercises
Chapter 8 (Part 2): Relations
Introductory Material
Presentation transcript:

Discussion #27 Chapter 5, Sections /15 Discussion #27 Closures & Equivalence Relations

Discussion #27 Chapter 5, Sections /15 Topics Reflexive closure Symmetric closure Transitive closure Equivalence relations Partitions

Discussion #27 Chapter 5, Sections /15 Closure Closure means adding something until done. –Normally adding as little as possible until some condition is satisfied –Least fixed point similarities

Discussion #27 Chapter 5, Sections /15 Reflexive Closure Reflexive closure of a relation: R (r) –smallest reflexive relation that contains R (i.e. fewest pairs added) –R (r) = R  I A (R is a relation on a set A, and I A is the identity relation  1’s on the diagonal and 0’s elsewhere.) R = R (r) =  x (xRx)

Discussion #27 Chapter 5, Sections /15 Symmetric Closure Symmetric closure of a relation: R (s) –smallest symmetric relation that contains R (i.e. fewest pairs added) –R (s) = R  R ~ (R ~ is R inverse) R = R ~ = R  R ~ =  x  y(xRy  yRx)

Discussion #27 Chapter 5, Sections /15 Transitive Closure Transitive closure of a relation: R (t) = R + –smallest transitive relation that contains R (i.e. fewest pairs added) –for each path of length i, there must be a direct path. (This follows from x  y, y  z  x  z; since, if we also have v  x, we must have v  z, a path of length 3.) –R (t) = R  R 2  R 3  …  R |A|. (No path can be longer than |A|, the number of elements in A.)

Discussion #27 Chapter 5, Sections /15 R  R 2  R 3 = R×R 2 = R 3 = Transitive Closure – Example R = R 2 = All paths of length 3 All paths of length 2 All paths of length

Discussion #27 Chapter 5, Sections /15 Transitive Closure – Example R = R 2 = R×R 2 = R 3 = R  R 2  R 3 = All paths of length 3 All paths of length 2 Paths of any length All paths of length 1

Discussion #27 Chapter 5, Sections /15 Reflexive Transitive Closure Reflexive transitive closure of a relation: R * –smallest reflexive and transitive relation that contains R –R * = I A  R + = R 0  R + = R 0  R 1  R 2  …R |A| Example: I A = R 0 = R 1  R 2  R 3 = R 0  R 1  R 2  R 3 =

Discussion #27 Chapter 5, Sections /15 Equivalence Relations A relation R on a set A is an equivalence relation if R is reflexive, symmetric, and transitive. –Equivalence relations are about “equivalence” –Examples: = for integersx = xreflexive x = y  y = xsymmetric x=y  y=z  x=ztransitive = for setsA = Areflexive A = B  B = Asymmetric A=B  B=C  A=Ctransitive Let R be “has same major as” for college students xRx  reflexive: same major as self xRy  yRx  symmetric: same major as each other xRy  yRz  xRz  transitive: same as, same as  same as

Discussion #27 Chapter 5, Sections /15 Partitions A partition of a set S is –a set of subsets S i=1,2,…n of S –such that  n i=1 S i = S, S j  S k =  for j  k. Each S i is called a block (also called an equivalence class) Example: –Suppose we form teams (e.g. for a doubles tennis tournament) from the set: {Abe, Kay, Jim, Nan, Pat, Zed} then teams could be: { {Abe, Nan}, {Kay, Jim}, {Pat, Zed} } Note: “on same team as” is reflexive, symmetric, transitive  an equivalence relation. Equivalence relations and partitions are the same thing (two sides of the same coin).

Discussion #27 Chapter 5, Sections /15 Partitions (continued…) Since individual elements can only appear in one block (S j  S k =  for j  k), blocks can be represented by any element within the block. e.g.Nan’s Team Jimmer’s 2011 sweet-16 team Formally, [x] = set of all elements related to x and y  [x] iff xRy e.g.[Nan] represents {Abe, Nan}, Nan’s team [Abe] represents {Abe, Nan}, Abe’s team [Jimmer] represents the set of players who played on BYU’s 2011 sweet-16 team

Discussion #27 Chapter 5, Sections /15 Partitions & Equivalence Relations The mod function partitions the natural numbers into equivalence classes. –0 mod 3 = 0 so 0 forms a class [0] –1 mod 3 = 1 so 1 forms new class [1] –2 mod 3 = 2 so 2 forms new class [2] –3 mod 3 = 0 so 3 belongs to [0] –4 mod 3 = 1 so 4 belongs to [1] –5 mod 3 = 2 so 5 belongs to [2] –6 mod 3 = 0 so 6 belongs to [0] –… Thus, the mod function partitions the natural numbers into equivalence classes. –[0] = {0, 3, 6, …} –[1] = {1, 4, 7,…} –[2] = {2, 5, 8, …} Example:

Discussion #27 Chapter 5, Sections /15 Partitions  Equivalence Relations Theorem: If {S 1, …, S n } is a partition of S, then R:S  S is an equivalence relation, where R is “in same block as.” Note: to prove that R is an equivalence relation, we must prove that R is reflexive, symmetric, and transitive. Proof: Reflexive: since every element is in the same block as itself. Symmetric: since if x is in the same block as y, y is in the same block as x. Transitive: since if x and y are in the same block and y and z are in the same block, x and z are in the same block.

Discussion #27 Chapter 5, Sections /15 Equivalence Relations  Partitions Theorem: If R:S  S is an equivalence relation and [x] = { y | xRy }, then { [x] | x  S } is a partition P of S. Note: to prove that we have a partition, we must prove (1) that every element of S is in a block of P, and (2) that for every pair of distinct blocks S j and S k (j  k) of P, S j  S k = . Proof: (1) Since R is reflexive, xRx, every element of S is at least in its own block and thus in some block of P. (2) Suppose S j  S k   for distinct blocks S j and S k of P. Then, at least one element y is in both S j and S k. Let S j = {y, x 1, … x n } and S k = {y, z 1, … z m }, then yRx i, i=1, 2, …, n, and yRz p, p=1, 2, …, m. Since R is symmetric, x i Ry, and since R is transitive x i Rz p. But now, since the elements of S j are R-related to the elements of S k, x 1, …, x n, y, z 1, …, z m are together in a block of P and thus S i and S k are not distinct blocks of P.