please help me with these problems 7, 12, 13 and 17. Questions are from the book “ Foundations of Algorithm” by Richard E Neapolitan, 5th Edition. TIA

here is the excersise 2 . thanks

6. Modify Prim's algorithm (Algorithm 4.1) to check if an undirected, weighted graph is connected. Analyze your algorithm and show the results using order notation 7. Use Kruskal's algorithm (Algorithm 4.2) to find a minimum spanning tree for the graph in Exercise 2. Show the actions step by step. 8. Implement Kruskal's algorithm (Algorithm 4.2) on your system, and study its performance using different graphs. 9. Do you think it is possible fora minimum spanning tree to have a cycle? Justify your answer 10. Assume that in a network of computers any two computers can be linked. Given a cost estimate for each possible link, should Algorithm 4.1 (Prim's algorithm) or Algorithm 4.2 (Kruskal's algorithm) be used? Justify your answer 11. Apply Lemma 4.2 to complete the proof of Theorem 4.2. Sections 4.2 12. Use Dijkstra's algorithm (Algorithm 4.3) to find the shortest path from vertex v to all the other vertices for the graph represented by the array in Exercise 3. Show the actions step by step. 13. Use Dijkstra's algorithm (Algorithm 4.3) to find the shortest paths from the vertex v, to all the other vertices of the graph in Exercise 2. Show the actions step by step. Assume that each undirected edge represents two directed edges with the same weight. 14. Implement Dijkstra's algorithm (Algorithm 4.3) on your system, and study its performance using different graphs. 15. Modify Dijkstra's algorithm (Algorithm 4.3) so that it computes the lengths of the shortest paths. Analyze the modified algorithm and show the results using order notation. 16. Modify Dijkstra's algorithm (Algorithm 4.3) so that it checks if a directed graph has a cycle. Analyze your algorithm and show the results using order notation 17. Can Dijkstra's algorithm (Algorithm 4.3) be used to find the shortest paths in a graph with some negative weights? Justify your answer 18. Use induction to prove the corectness of Dijkstra's algorithm (Algorithm 4.3) Sections 4.3 19. Consider the following jobs and service times. Use the algorithm in Section 4.3.1 to minimize the total amount of time spent in the system. Jols Service Tine 7 3 10 20. Implement the algorithm in Section 4.3.1 on your system, and run it on the instance in Exercise 17, EXERCISES Sections 4.1 1. Show that the greedy approach always finds an optimal solution for the Change problem when the coins are in the denominations D, D', D,.. , D for some integers i > 0 and D> 0. 2. Use Prim's algorithm (Algorithm 4.1) to find a minimum spanning tree for the following graph. Show the actions step by step. 13 45 10 28 29 3. Consider the following array: 4 9039 73 sc 70 73 71 79 77 60 77 0 80 73 40 (a) Starting with vertex v trace through Prim's algorithm to find a minimum spanning tree for the graph represented by the array shown here. (b) Show the set of edges that comprise the minimum spanning tree. (c) What is the cost of the minimum spanning tree? 4. Draw a graph that has more than one minimum spanning tree. 5. Implement Prim's algorithm (Algorithm 4.1) on your system, and study its performance using different graphs. 6. Modify Prim's algorithm (Algorithm 4.1) to check if an undirected, weighted graph is connected. Analyze your algorithm and show the results using order notation 7. Use Kruskal's algorithm (Algorithm 4.2) to find a minimum spanning tree for the graph in Exercise 2. Show the actions step by step. 8. Implement Kruskal's algorithm (Algorithm 4.2) on your system, and study its performance using different graphs. 9. Do you think it is possible fora minimum spanning tree to have a cycle? Justify your answer 10. Assume that in a network of computers any two computers can be linked. Given a cost estimate for each possible link, should Algorithm 4.1 (Prim's lli Alab