DSAA
Introduce the algorithm
12112104 程司哲 Reading report for the SSSP paper
The classic algorithm for single-source shortest paths(SSSP) problem are Bellman-Ford and Dijkstra's algorithm. However, the Bellman-Ford Algorithm has the time complexity of
The algorithm use graph decomposition and elementary combinatorial tools instead of sophisticated continuous optimization methods and dynamic algorithm which all other recent developments used.
The key of the algorithm is graph decomposition. This algorithm decomposes any directed graph to many strongly-connected components, which make the sub-problerm in every part can be solved in non-linear time. Generally, the paper raised two important sub-algorithms: ScaleDown and SPmain. The purpose of ScaleDown is to decompose the graph, which make every part can be solved in Dijkstra's Algorithm. SPmain finds a shortest path tree in the base of ScaleDown. And support the conditions of graphs which contain a negative-weight cycle.
The paper also uses a way called low-diameter decomposition. This algorithm can decomposes any directed graph with non-negative edge weights into SCCs of small diameter. Finally, it uses all these tools and a way of deciding Price Function, to transfer the original graph into a graph which contains no negative weight edges, which can solved by Dijkstra's algorithm directly.
Price Functions
Price functions are useful tools for SSSP problems. Given G = (V, E, w) and a price function
Our goal is to find a
The way: 1. Create a dummy source s with edges of weight 0 to every vertex.
- set
\phi(v) = dist(s, v)
The paper proves a lemma: We can compute all dist(s, v) in time O(m, k), which s becomes a source and all shortest path from s contain at most k negative edges. (extends of Dijkstra)
Improved lemma: For the average vertex there are at most k negative edges(don't need every vertices!), we can also find such an algorithm.
So we can set a new goal: Reduce the negative edges as more as possible.
Then, we come to:
Low Diameter Decomposition
We want to make the connected components -
The tough procedure:
-
Repeatedly pick an arbitary source and grow a ball for a randomly chosen threshold.
-
Add all edges on the boundary of ball to
E_sep -
Recurse onto other parts of G.
The algorithm splits edges into several kinds by the relationship of SCCs. Edges inside, between and edges of
ScaleDown
The algorithm has several phases. In Phase 0, it decompose the whole graph into SCCs with weak diameter, which directly use the tool of Low Diameter Decomposition. In Phase 1, it trys to make edges inside the SCCs non-negative. We called ScaleDown recursively in this phase. In phase 2, it makes all edges between the SCCs non-negative, except the edge set in the small graph. And in last phase, we fix the edges of
Input of the algorithm: graph G with w(e) >= -2B
Output: price function such that price >= -B.
In detail, we can find that we also handle 3 kinds of edges as we did in Low Diameter Decomposition.
SPMain
The function scales up all edge weights. Then, it creates an equivalent graph by scaling up edge weights by
Finally, we use a method called price function to prove the correctness of the algorithm.