This is a question from \"Algorithm Design\", chapter 4 question 2: https://www.
ID: 3587653 • Letter: T
Question
This is a question from "Algorithm Design", chapter 4 question 2: https://www.chegg.com/homework-help/Algorithm-Design-1st-edition-chapter-4-problem-2E-solution-9780321295354
Thank you
For each of the following two statements, decide whether it is true or false. If it is true, give a short explanation. If it is false, give a counterexample. (a) Suppose we are given an instance of the Minimum Spanning Tree Problem on a graph G with edge costs that are all positive and distinct. Let T be a minimum spanning tree for this instance. Now suppose we replace each edge cost ce by its square, thereby creating a new instance of the problem with the same graph but different costs. True or false? T must still be a minimum spanning tree for this new instance. (b) Suppose we are given an instance of the Shortest s-t Path Problem on a directed graph G We assume that all edge costs are positive and distinct. Let P be a minimum-cost s-t path for this instance. Now suppose we replace each edge cost ce by its square, ce2, thereby creating a new instance of the problem with the same graph but different costs. True or false? P must still be a minimum-cost s-t path for this new instance.Explanation / Answer
When the edge weights are squared the minimum spanning tree won't change.
because sum of squares is always less than the square of the sums except for a single element case.
Let TT and TT be the minimum spanning trees of GG and GG, respectively, with total weights tt and tt.
T=T with total weight t=t2 is true for single edge graph
T=T with total weight t<t2 is true for most graphs
TT but total weight t=t2 is true when G has multiple MSTs.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.