# lect10 - Closures of relations A closure extends a relation...

This preview shows pages 1–8. Sign up to view the full content.

1 Closures of relations A closure “extends” a relation to satisfy some property. But extends it as little as possible. Definition . The closure of relation R with respect to property P is the relation S that i) contains R ii) satisfies property P iii) is contained in any relation satisfying i) and ii). That is S is the “smallest” relation satisfying i) and ii).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Lemma 1 . The reflexive closure of R is S = R {( a , a ) | a A } =r ( R ) . S contains R and is reflexive by design. Furthermore, any relation satisfying i) must contain R , any satisfying ii) must contain the pairs ( a , a ), so any relation satisfying both i) and ii) must contain S Proof. In accordance to the definition of a closure, we need to prove three things to show that S is reflexive closure: i) S contains R ii) S is reflexive iii) S is the smallest relation satisfying i) and ii).
3 Lemma 2 . The symmetric closure of R is S = R R -1 = s ( R ) Proof . S is symmetric and contains R . It is also the smallest such . For suppose we have some symmetric relation T with R T . To show that T contains S we need to show that R -1 T . Take any ( a , b ) R -1 , it implies ( b , a ) R , and ( b , a ) T, since R T. But then ( a , b ) T as well, because T is symmetric by assumption. So, S = R R -1 T .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Theorem. The transitive closure of a relation R is the set S = {( a , b ) | there is a path from a to b in R }= t ( R ) Proof. Let’s show that S is transitive. Suppose ( a , b ) S and ( b , c ) S. This means there is a path from a to b and a path from b to c in R. If we concatenate” them (attach the end of the ( a , b )-path to the start of the ( b , c )-path) we get a path from a to c . Thus, ( a , c ) S and S is transitive. We need to show, that any transitive relation T containing R contains S . Let’s prove by contradiction. Assume that there exists a transitive relation T containing R , that is smaller then S .
5 More formally: assume by the way of contradiction that there exists a transitive relation T , such that R T , but S T. We want to show that it results to contradiction, that will prove the claim, that S is the smallest transitive relation, that includes R. / 5 ( x , y ) S but ( x , y ) T 5 ‘a path’ from x to y in R x y R x y since R T and T is transitive ( x , y ) T (contradiction) / S T

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 An alternative way to represent transitive closure is as the union of paths with different length t ( R ) = S 1 S 2 S 3 where S n = {( a , b ) | there is a path of length n from a to b in R } Lemma 3 . The transitive closure of the relation R is t ( R ) = R R 2 R 3 (left for you to prove) Theorem . ( a , b ) R n iff there is a path of length n in R . (will be proved later by induction) Thus, we can prove the following equivalent definition of transitive closure
7 Theorem . Suppose R is a relation on a set A , R A × A , | A |= n , and there is a path of length m > n from a to b in R.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 07/14/2011.

### Page1 / 33

lect10 - Closures of relations A closure extends a relation...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online