I'm currently reading introduction to algorithms and came by Johnson’s algorithm that depends on making sure that all paths are positive.
the algo depends on finding a new weight function (w') that is positive for all edges and keeps the correctness of the shortest paths relations.
It does so by calculating h(s), h(d) values to be added to the w original value.
My question is, why not just find the smallest w in the graph and add it to all edges ? this will satisfy both conditions and will require less calculation.