1) Initialize all distances as minus infinite instead of plus infinite.
2) Modify the relax condition in Dijkstra's algorithm to update distance
of an adjacent v of the currently considered vertex u only
if "dist[u]+graph[u][v] > dist[v]". In shortest path algo,
the sign is opposite.
(A) True
(B) False
I think it must be true but answ given is false , its says that In shortest path algo, we pick the minimum distance vertex from the set of vertices for which distance is not finalized yet. And we finalize the distance of the minimum distance vertex.
For maximum distance problem, we cannot finalize the distance because there can be a longer path through not yet finalized vertices.
Now I am nt getting that when all are initialized with minus infinty so then maximum can be found , so then whats the issue why cant we finalize it ?