ch9.new

# ch9.new - Chapter 9 The Transitive Closure, All Pairs...

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

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.

Unformatted text preview: Chapter 9 The Transitive Closure, All Pairs Shortest Paths This chapter studies two related problems that answers the following questions. 1. Can I get there from here? (is there a path from u to v?) 2. What is the shortest path from u to v? Kleene, Warshall, and Floyd all studied these problems. Kleene – the kleene closure, regular languages Warshall – transitive closure Floyd – all pairs of shortest paths There are many applications -- networks, air routes, computer connections, flowcharts, electrical connections, passwords, etc. 9.2.1 Definition of transitive closure and adjacency matrix. Definitions: * S a finite set of elements. * binary relation on S is a subset of S X S, call it A. s i is related to s j with the notation s i As j * Can be represented by an adjacency matrix, which is an important relation in itself. { j i As s if true otherwise false ij a = * Equivalence relation and partial orders are additional examples of interesting relations. * The relation can be viewed as a directed graph as we looked at in the previous chapter. G = (S,A). S is the vertices, A as the ordered pairs of edges. * zero matrix – all entries 0. * Notation – ۸ and, ۷ or, ¬ not, + binary or, ∑ multi-way or (not exclusive or, which is not used in this chapter) * identity matrix – all entries 0 except the diagonal which is 1. * A relation is transitive iff for all x, y, z in S xAy, yAz implies xAz. * Transitive - from any value s j As i , s i As k implies s j As k (gets to another value). * Reflexive Transitive closure – Let S be a set and let A be a binary relation on S. Let G = (S,A). RTC is a binary relation R defined by: s i Rs j iff there is a path from s i to s j in G * Reflexive since there is a path from each vertex to itself of length zero. * We are to study methods of finding the transitive closure. * Assume the number of elements of S is n. * Assume the number of elements of A is m. * A relation and its transitive closure. A = 00010 00100 01000 00010 01001 R = 01111 01110 01110 01110 11111 9.2.2 Finding the Reachability Matrix by Depth-first search * Let R ultimately be the reachability matrix.* Let R ultimately be the reachability matrix....
View Full Document

## This note was uploaded on 07/10/2011 for the course COT 4400 taught by Professor Eggen,r during the Fall '08 term at UNF.

### Page1 / 7

ch9.new - Chapter 9 The Transitive Closure, All Pairs...

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

View Full Document
Ask a homework question - tutors are online