Sail E0 Webinar
Question
Assuming value of every weight to be greater than 10, in which of the following cases the shortest path of a directed weighted graph from 2 vertices u and v will never change?
Options:
A .  add all values by 10
B .  subtract 10 from all the values
C .  multiply all values by 10
D .  In both the cases of multiplying and adding by 10
Answer: Option C


In case of addition or subtraction the shortest path may change because the number of edges between different paths may be different, while in case of multiplication path wont change.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers