11. Simulate the BFS algorithm (see slides) on this graph to compute the shortest paths between 0 and every other node. Use the adjacency list below for the order of the nodes explored and follow the trace format shown below for your answer. Node Adjacent 10 1,32 1 5.04 0.3 2.04 3,1,56 1,467 (2 a 14 15 6 7 5,4 5 Trace format (use it as a template for your answer): Before loop: marked[0]=T queue (0)//right is front Loop 1: v= edge Tol ]= marked[ ]= edge Tol ]= marked[ ]= edge To[ ]= marked[ ]= queue = {
12. List the edges implied by the contents of edgeTo after the algorithm has completed in Q1. Formatting: write "[0]-> [1]" to indicate an edge from node 0 to 1. 13. Based on Q1, list the nodes on the path from node 0 to node 6. (Be sure to include both the first and last nodes!) 14. Why is the path you gave in the previous question the shortest path between 0 and 6? Explain why this path produced by BFS is the shortest one.
Node Adjacent 0 1,3,2 1 5, 0, 4 0,3 2,0,4 3, 1, 5, 6 1,4,6,7 2 3 4 5 6 7 5,4 5