assignment4_sol.pdf - CSC130 Assignment 4 Fall 2017 1. (20...

This preview shows page 1 - 5 out of 10 pages.

CSC130Assignment 4Fall 201711. (20 Points) Given the adjacency list for a undirected graph as the following andsource vertex as 0a) Provide path tree by using the following DFS algorithm0: 8 1 111: 02: 9 43: 8 124: 2 105: 7 6 96: 5 97: 5 88: 3 0 10 79: 2 10 6 510: 8 9 411: 0 1212: 3 11
CSC130Assignment 4Fall 20172b) Provide path tree by using the following BFS algorithmAnswer:
CSC130Assignment 4Fall 20172. (10 Points) Does the following digraph have a topological order? If so, provideone. If not, explain why.14: 9 3 4 2 1
3
CSC130Assignment 4Fall 201743. (20 Points) Given the edge weighted graph as the follows,a) Use Lazy Prim’s algorithm to find the Minimum Spanning tree (MST), provide thelist of edges in the order as they are added to the (MST) and the weight of MST.b) Use Kruskal’s algorithm to find the MST, provide the list of edges in the order asthey are added to the (MST) and the weight of MST.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 10 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture