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?

Slides:



Advertisements
Similar presentations
Chapter 2 Revision of Mathematical Notations and Techniques
Advertisements

Epp, section 10.? CS 202 Aaron Bloomfield
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
De Bruijn sequences Rotating drum problem:
Chapter 3 Relations. Section 3.1 Relations and Digraphs.
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Basic Properties of Relations
Representing Relations Using Matrices
Applied Discrete Mathematics Week 11: Graphs
Ch. 8: Relations 8.1 Relations and their Properties.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
Equivalence Relations: Selected Exercises
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.
Applied Discrete Mathematics Week 10: Equivalence Relations
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∩
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
Relations (1) Rosen 6 th ed., ch. 8. Binary Relations Let A, B be any two sets. A binary relation R from A to B, written (with signature) R:A↔B, is a.
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.
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.
CSC-2259 Discrete Structures
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
1 Closures of Relations: Transitive Closure and Partitions Sections 8.4 and 8.5.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
Rosen, Section 8.5 Equivalence Relations
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Lecture 4.3: Closures and Equivalence Relations CS 250, Discrete Structures, Fall 2013 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
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 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.
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 Relations and Their Properties
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.
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.
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), (
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.
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.
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.
Representing Relations Using Digraphs
Relations and Their Properties
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.
Aaron Bloomfield CS 202 Rosen, section 7.4
Representing Relations
Dr. Ameria Eldosoky Discrete mathematics
CS 173: Discrete Mathematical Structures
CSNB 143 Discrete Mathematical Structures
Lecture 4.3: Closures and Equivalence Relations
Applied Discrete Mathematics Week 10: Equivalence Relations
CSE15 Discrete Mathematics 04/26/17
Relations.
Closures of Relations: Transitive Closure and Partitions
Relations and Digraphs
Lecture 4.3: Closures and Equivalence Relations
Relations and their Properties
Properties of Relations
9.4 Connectivity.
Basics of Relations.
Closures of Relations Epp, section 10.1,10.2 CS 202.
Representing Relations Using Matrices
4.4 Properties of Relations
Presentation transcript:

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? If not, is there a (possibly indirect) link between each of the cities? To answer, we want to find the Transitive Closure

Closures, in general Def: Let R be a relation on a set A that may or may not have some property P. (Ex: Reflexive,…) If there is a relation S with property P containing R such that S is a subset of every relation with property P containing R, then S is called the closure of R with respect to P. Note: the closure may or may not exist

Reflexive Closures- Idea, Example Reflexive Closure of R—the smallest reflexive relation that contains R Consider R={(1,2),(2,3),(3,2)} on A={1,2,3} 12 3 Using both ordered pairs and digraphs, find the reflexive closure.

Reflexive Closures Reflexive Closure of R—the smallest reflexive relation that contains R Reflexive Closure = R  Where ={(a,a)| a  A} is the diagonal relation on A.

More examples Find the reflexive closures for: – R={(a,b)|a<b} on the integers Z – R={(a,b)|a ≠ b} on Z

Symmetric Example Find the symmetric closure of R={(1,1), (1,2),(2,2),(2,3),(3,1),(3,2)} on A={1,2,3} 12 3

Symmetric Closures Symmetric Closure of R = R  R -1 Where R -1 = {(b,a) | (a,b)  R} Example: R={(a,b)|a>b} on the integers Z Symmetric closure:

Transitive Theory- example Add all (a,c) such that (a,b), (b,c)  R. Keep going. (Why?)

Transitive Closure Theory, and Def of Path Def: A path from a to b in a directed graph G is a sequence of edges (x 0,x 1 ), (x 1,x 2 )… (x n-1, x n ) in G where x 0 =a and x n =b. It is denoted x 1, x 2,…x n and has length n. When a=b, the path is called a circuit or cycle.

Find Transitive Closure- see worksheet Do Worksheet Find the transitive closure Find circuits and paths of length 2, 3, 4

Example- in matrices Using the idea that R n+1 = R n °R and M S°R = M R   M S, Find the matrices for RR 2 R 3 R 4 The find paths of length 2, 3, 4

Example =

Next step In order to come up with a theory for the transitive closure, we will first study paths….

Theorem 1 Theorem 1: Let R be a relation on a set A. There is a path of length n from a to b iff (a,b)  R n Proof method?

Proof of Thm. 1 By induction: N=1: true by definition (path from a to b of l=1 iff (a,b)  R). Induction step: Assume: There exists a path of length __ from ___iff ______ Show: There exists a path of length __ from ___iff ______ Assuming the IH (Inductive Hypothesis), There is a path of length __ from ___ Iff There exists an element c with a path from a to c in R and a path of length n from c to b in ___ IffThere exists an element c with (a,c)  ___ and (c,b)  ___ Iff (a,b)  ____ = _______

Def 2: Connectivity relation Def. 2: Let R be a relation on set A. The connectivity relation R* consists of the pairs (a,b) such that there is a path between a and b in R. R* =

Examples R={(a,b)| a has met b} – 6 degrees – Erdos number – R* include (you,__) R={(a,b)| it is possible to travel from stop a to b directly} on set A of all subway stops – R*= R={(a,b)|state a and b have a common border” on the set A of states. – R*=

Thm. 2: Transitive closure is the connectivity relation Theorem 2: The transitive closure of a relation R equals the connectivity relation R* = Elements of the Proof: Note that R  R* To show R* is the transitive closure of R, show: 1) R* is ________ 2) Whenever S is a transitive relation that contains R, then R* ______

Proof of Thm 2 1)Assume (a,b)  R* and (b,c)  R* So (a,b)  ___ and (b,c)  ___ By Thm. 1, there exists paths… 2 paths: In conclusion ________

Thm 2 proof… 2) Suppose S is a transitive relation containing R It can be shown by induction that S n is transitive. By a previous theorem in sec. 8.1, S n ___ S. Since S* = S k and S k __ S, the S* ___ S. Since R ___S, the R* ____ S*. Therefore R* ___ S* ___ S.