Correct

Dark Mode

167 views

1 vote

Both are True.

First one :A sub-path of a shortest path is a shortest path. This is the theorem and optimal structure property and basis of dijkstra algorithm .True

Second one:- If a graph G contains a negative-weight cycle, then some shortest paths may not exist. This is also true .

Ref: https://www2.cs.arizona.edu/classes/cs545/fall09/ShortestPath.prn.pdf