CSCI 2300 Lab 6 Fall 2014, 10/15/14

This lab is about graphs, BFS and algorithms.
  1. The BFS procedure is already described in the above code. Modify the code to make it (shortest path algorithm) work on a weighted directed graph (i.e., edges have weights) You can use Priority queue from STL. Output will be the shortest path froma given source to a given destination. Test it with data6
  2. Modify the above code to produce minimum spannig tree of an undirected graph. Out put will be the minimum spanning tree edges. Test it with data62
  3. In class (10/9/2014), we talked about getting a code for a tree and reconstruction from the code to a tree - It is called Prufer sequence. Please look at Prufer Sequence . For complete graphs with 4 vertices, there are 16 trees. The corresponding Prufer Sequences are: 1,1; 1,2; 1,3; 1,4; 2,1; 2,2; 2,3; 2,4; 3,1;3,2; 3,3; 3,4; 4,1; 4,2; 4,3; 4,4; Construct a tree for any two of them.