We present an approximation algorithm for the all pairs shortest paths (APSP) problem in weighed graphs. Our algorithm solves the APSP problem for weighted directed graphs, with real (positive or negative) weights, up to an additive error of . For any pair of vertices u, v, the algorithm finds a path whose length is at most δ(u, v) + . The algorithm is randomized and runs inÕ(n (ω+3)/2 ) < O(n 2.688 ) time, where n is the number of vertices and ω is the matrix multiplication exponent. The absolute weights are allowed to mildly depend upon n, being at most n o(1) (we note that even if the weights are constants, δ(u, v) can be linear in n, while the error requirement is a small constant independent of n). Clearly, -additive approximations generalize exact algorithms for integer weighted instances. Hence, if ω = 2 + o(1), this algorithm is as fast as any algorithm known for integer APSP in directed graphs, and is more general.
For approximate APSP for real-valued graphs with weights in [−n o (1) ,n o (1) ], Yuster REF presented an additive ε-approximation in time O(n ω +3 2 ).
Approximate shortest paths in weighted graphs
J. Comput. Syst. Sci.
J. Comput. Syst. Sci.
Mathematics Computer Science