23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A digraph<br />

examples.)<br />

is acyclic if it has no directed cycles. (See Figure 13.8 for some<br />

The transitive closure of a digraph is the digraph such that the vertices of<br />

are the same as the vertices of , <strong>and</strong> has an edge (u, v), whenever<br />

has a directed path from u to v. That is, we def<strong>in</strong>e by start<strong>in</strong>g with the digraph<br />

<strong>and</strong> add<strong>in</strong>g <strong>in</strong> an extra edge (u, v) for each u <strong>and</strong> v such that v is reachable from<br />

u (<strong>and</strong> there isn't already an edge (u, v) <strong>in</strong> ).<br />

Figure 13.8: Examples of reachability <strong>in</strong> a digraph: (a)<br />

a directed path from BOS to LAX is drawn <strong>in</strong> blue; (b) a<br />

directed cycle (ORD, MIA, DFW, LAX, ORD) is shown <strong>in</strong><br />

blue; its vertices <strong>in</strong>duce a strongly connected subgraph;<br />

(c) the subgraph of the vertices <strong>and</strong> edges reachable<br />

from ORD is shown <strong>in</strong> blue; (d) remov<strong>in</strong>g the dashed<br />

blue edges gives an acyclic digraph.<br />

828

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!