Computer Science 245
Spring 2009
Homework 8: B-Trees and Connected Components
Due Monday, April 20th 3:30 p.m.
- Consider the following graph:

-
Show the Vertex / Distance / Path table after Dijstra's algorithm is run on this graph, starting at vertex 0.
- Show thet Vertex / Distance / Path table after Prim's algorithm is run on this graph, starting at vertex 0.
- Consider a B-Tree with maximum degree k (that is,
all interior nodes have between (k+1)/2 and k children -- a 2-3 tree is
a B-Tree with maximim degree 3).
- What is the largest number of keys that can be stored in
a B-Tree of height h with maximum degree k?
- What is the smallest number of keys that can be stored in
an B-Tree of height h with maximum degree k?
Show your work!
(Hint: You may find the following formula helpful:)
n
∑ xi
= (x(n+1) - 1) / (x-1)
i = 0
- Consider the following directed graph:

Run the connected component algoirhtm on this graph. Show all
discovery and finish times for all vertices, as well as the Depth-First
Forrest of the final pass of the algorithm.