Lab 10 - Graphs and Trees

This lab is divided into two parts. Each part is worth 5 points. Since this lab involves drawing, you may find it easier to do on paper. If you do it electronically, save in PDF format.

Part 1 - Graphs

Draw the directed graph given by the following adjacency list. This list is formatted like the input file in HW 7.
A, 2 3, 4 5
B, 3 6, 4 2
C, 5 2
D, 2 1, 3 4, 5 6
E, 1 5, 3 7
Compute the shortest path from A to all other nodes using Dijkstra's algorithm for weighted graphs. Since you are computing it for A to all other nodes, you will continue until all the nodes have been marked as found/processed. Show each step of the algorithm. That is, when you alter the table, do not erase the original table, instead create a new table with the alterations. Your progression of tables should look similar to the example in the lecture notes.

Part 2 - 2-3-4 Trees

Pages 859 to 861 in the book show inserting the values 53, 27, 75, 25, 70, 41, 38, 16, 59, 36, 73, 65, 60, 46, 55, 33, 68, 79, 48 using the book's bottom-up splitting method. This is where you travel to the leaf, then split upwards through the tree if splitting is needed. Show how the insertion differs when you use top-down insertion and split any 4-node nodes while finding the leaf (Note: the last top-down split I showed in class Wedn. was incorrect. I'll show the correct split at the start of lab).