CSCI 2300 Lab 6 Fall 2012, 10/17/12
This lab is about graphs, BFS and algorithms.
- 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
- 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
- In class (10/11/2012), 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 . Construct a tree whose prufer sequence is 2,3,4,6.