8.6k views
4 votes
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, c², thereby creating a new instance of the problem with the same graph but different costs.

Consider the following statement, decide whether it is true or false. If it is true, give a short explanation. If it is false, give a counterexample.

Statement: P must still be a minimum-cost s t path for this new instance.

1 Answer

3 votes

Final answer:

The statement is false because replacing edge costs with their squares does not necessarily preserve the minimum-cost path.

Step-by-step explanation:

The statement is false. Replacing each edge cost c by c² will not necessarily preserve P as a minimum-cost s-t path for the new instance. To illustrate this, consider the following counterexample:

  • Assume a directed graph G with two vertices s and t connected by two edges: (s, x) with cost 2 and (x, t) with cost 4.
  • Let P be the path (s, x, t) with total cost 6, which is the minimum-cost s-t path for G.
  • If we replace each edge cost c by c², the new instance will have edge costs 4 (2²) and 16 (4²).
  • A new path (s, x, t) still exists in the new instance, but its total cost is now 20 (4+16), which is greater than the previous minimum cost of 6. Therefore, P is not a minimum-cost s-t path for the new instance.
User Wulfram
by
7.6k points