Home /
Expert Answers /
Computer Science /
1-find-the-topological-ordering-for-the-aov-network-graph-in-the-picture-below-9-lt-2-3-lt-7-7-lt-pa809
(Solved): 1. Find the topological ordering for the AOV network graph in the picture below 9<2,3<7,7< ...
1. Find the topological ordering for the AOV network graph in the picture below 9<2,3<7,7<5,5<8,8<6,4<6,1<3,7<4,?
2. Write a program to perform a topological sort for the following graph. To implement your program you should demonstrate the followings (Write a program in the form of the programming example shown in the picture below.): (1) It represents the AOV network graph as a list of connections from problem \#1. Since there are 9 nodes, we need to construct 9 linked lists.. (2) Execute the algorithm for the topological sort. //input the AOV-network: n : \# of vertices.// for i=1 to n{ if (vertexi has a predecessor) // graph has a cycle and is infeasible terminate with fail; else { pick a vertex v which has no predecessors; output v; delete v and all edges from v;} \} //input the AOV-network: n : \# of vertices.// for i=1 to n{ if (vertexi has a predecessor) // graph has a cycle and is infeasible terminate with fail; else { pick a vertex ? which has no predecessors; output v; delete v and all edges from v;; \}