1

I have the below APSP algorithm:

enter image description here

This computes the shortest path. The length of the path is the sum of weights of edges of path.

How can i modify the above algorithm in order to compute the shortest path where length is the weight of the heaviest edge on this path.

Any help would be great!!!

1
  • this looks more similar to widest path, except, as pointed out by Yevgeniy, it should use max instead of min. Commented Dec 22, 2021 at 17:38

1 Answer 1

2

On 7th line instead of

cost = D[i, k] + D[k, j]

you just should put

cost = Max(D[i, k], D[k, j])
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.