Question: Confused as to what algorithm, I know Dijkstra's Algorithm operates in O(V+E(logV)) time but if we want to know every node (for all V) then

 Confused as to what algorithm, I know Dijkstra's Algorithm operates in

Confused as to what algorithm, I know Dijkstra's Algorithm operates in O(V+E(logV)) time but if we want to know every node (for all V) then how would you apply an algorithm? One of my immediate thoughts was Johnson's algorithm which is the time complexity but that is for directed acyclic graph. How do I solve this question?

For the person who said Dijkstra with 0 context, maybe explain. Dijkstra is doing minimum distance to all nodes from a singular source. This is to a set of source nodes.

2. We are given a weighted (positive weights) undirected graph G = (V, E), and a set F CV of special nodes. The nodes represent all locations in a city, and the set F represents the locations of a firehouse. For planning purposes, we want to know, for each location in the city, the minimum distance to some firehouse. Describe (briefly) an O((V + E) lg V) algorithm to do this. Refer to known algorithms and describe the (simple) modification. 2. We are given a weighted (positive weights) undirected graph G = (V, E), and a set F CV of special nodes. The nodes represent all locations in a city, and the set F represents the locations of a firehouse. For planning purposes, we want to know, for each location in the city, the minimum distance to some firehouse. Describe (briefly) an O((V + E) lg V) algorithm to do this. Refer to known algorithms and describe the (simple) modification

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!