Question 2. Consider the following scenario. ● G is a simple, weighted, undirected graph. • S is a shortest path tree of
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Question 2. Consider the following scenario. ● G is a simple, weighted, undirected graph. • S is a shortest path tree of
Question 2. Consider the following scenario. ● G is a simple, weighted, undirected graph. • S is a shortest path tree of G starting at vertex s. ● T is a minimum spanning tree of G. G' is a graph that is basically a copy of G except that every edge weight has been increased by a constant c. (a) Disprove the following statement by drawing a counterexample. The vertices and edges making up S in G also make up a shortest path tree in G'. (Note: This is why it doesn't work to just add a constant to a graph with negative weights so that you can use Dijkstra's Algorithm on it.) (b) Prove that the following statement is true. The vertices and edges making up T in G also make up a minimum spanning tree in G'. (Hint: To prove this, you may want to use the fact that Kruskal's Algorithm will work correctly on all input graphs.)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!