Programming, Data Structures and Algorithms using Python, Quiz 2
Consider the following strategy to solve the single source shortest path problem with positive integer edge weights from a source vertex s:
Replace each edge with weight w by w edges of weight 1 connected by new intermediate nodes. Run BFS(s) on the modified graph to find the shortest path to each of the original vertices in the graph.
Which of the following statement is true?
Consider the following strategy to solve the single source shortest path problem with positive integer edge weights from a source vertex s:\ Replace each edge with weight w by w edges of weight 1 connected by new intermediate nodes. Run BFS(s) on the modified graph to find the shortest path to each of the original vertices in the graph.\ Which of the following statement is true? Which of the following statements is **true** about Dijkstra's algorithm to find the shortest path? Figure from the original question paper