Texts: please answer them without using ChatGPT, please give me 100% correct answers. Single-source shortest paths, continued
(a) Algorithm DAG-SHORTEST-PATHS finds shortest paths from a source s by relaxing edges in some order. Consider a modification of the algorithm that relaxes edges in a reversed order.
Statement: If each vertex is reachable by an edge from the source, then the modified algorithm correctly finds the shortest paths to each vertex. Is this statement true?
Circle your answer:
yes
no
Statement: If the modified algorithm correctly finds the shortest paths to each vertex, then each vertex is reachable by an edge from the source. Is this statement true?
Circle your answer:
yes
no
(b) Algorithm DIJKSTRA uses a priority queue on which we can perform the operations insert, extract minimum, and decrease key.
Statement: In an execution of DIJKSTRA, at least one decrease-key operation is always performed between any two consecutive extract-min operations.
Is this statement true?
Circle your answer:
yes
no
(c) Algorithm DIJKSTRA is always correct on input weighted graphs with non-negative weights.
Statement: Algorithm DIJKSTRA is always correct on input weighted graphs with at most one edge of negative weight.
Is this statement true?
Circle your answer:
yes
no