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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Repeat Exercise R-13.22 for Figure 13.12 illustrat<strong>in</strong>g the topological sort<strong>in</strong>g<br />

algorithm.<br />

R-13.27<br />

Repeat Exercise R-13.22 for Figures 13.14 <strong>and</strong> 13.15 illustrat<strong>in</strong>g Dijkstra's<br />

algorithm.<br />

R-13.28<br />

Repeat Exercise R-13.22 for Figures 13.18 <strong>and</strong> 13.20 illustrat<strong>in</strong>g Kruskal's<br />

algorithm.<br />

R-13.29<br />

Repeat Exercise R-13.22 for Figures 13.21 <strong>and</strong> 13.22 illustrat<strong>in</strong>g the Prim-<br />

Jarník algorithm.<br />

R-13.30<br />

How many edges are <strong>in</strong> the transitive closure of a graph that consists of a simple<br />

directed path of n vertices?<br />

R-13.31<br />

Given a complete b<strong>in</strong>ary tree T with n nodes, consider a directed graph<br />

hav<strong>in</strong>g the nodes of T as its vertices. For each parent-child pair <strong>in</strong> T, create a<br />

directed edge <strong>in</strong> from the parent to the child. Show that the transitive closure<br />

of has O(n log n) edges.<br />

R-13.32<br />

A simple undirected graph is complete if it conta<strong>in</strong>s an edge between every pair<br />

of dist<strong>in</strong>ct vertices. What does a depth-first search tree of a complete graph look<br />

like?<br />

R-13.33<br />

Recall<strong>in</strong>g the def<strong>in</strong>ition of a complete graph from Exercise R-13.32, what does<br />

a breadth-first search tree of a complete graph look like?<br />

R-13.34<br />

Say that a maze is constructed correctly if there is one path from the start to the<br />

f<strong>in</strong>ish, the entire maze is reachable from the start, <strong>and</strong> there are no loops around<br />

any portions of the maze. Given a maze drawn <strong>in</strong> an n × n grid, how can we<br />

872

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

Saved successfully!

Ooh no, something went wrong!