In this work we derandomize two central results in graph algorithms, replacement paths and distance sensitivity oracles (DSOs) matching in both cases the running time of the randomized algorithms. For the replacement paths problem, let G = (V,E) be a directed unweighted graph with n vertices and m edges and let P be a shortest path from s to t in G. The replacement paths problem is to find for every edge e P the shortest path from s to t avoiding e. Roditty and Zwick [ICALP 2005] obtained a randomized algorithm with running time of O(m n ). Here we provide the first deterministic algorithm for this problem, with the same O(m n ) time. For the problem of distance sensitivity oracles, let G = (V,E) be a directed graph with real-edge weights. An f-Sensitivity Distance Oracle (f-DSO) gets as input the graph G=(V,E) and a parameter f, preprocesses it into a data-structure, such that given a query (s,t,F) with s,t V and F E V, |F| f being a set of at most f edges or vertices (failures), the query algorithm efficiently computes the distance from s to t in the graph G F ( i.e. , the distance from s to t in the graph G after removing from it the failing edges and vertices F). For weighted graphs with real edge weights, Weimann and Yuster [FOCS 2010] presented a combinatorial randomized f-DSO with O(mn^ 4- ) preprocessing time and subquadratic O(n^ 2-2(1- ) f ) query time for every value of 0 < < 1. We derandomize this result and present a combinatorial deterministic f-DSO with the same asymptotic preprocessing and query time.
@cite_21: Let G = (V, E) be a directed graph with positive edge weights, let s, t be two specified vertices in this graph, and let π(s, t) be the shortest path between them. In the replacement paths problem we want to compute, for every edge e on π(s, t), the shortest path from s to t that avoids e. The naive solution to this problem would be to remove each edge e, one at a time, and compute the shortest s - t path each time; this yields a running time of O(mn + n2 log n). Gotthilf and Lewenstein [8] recently improved this to O(mn+n2 log log n), but no o(mn) algorithms are known. We present the first approximation algorithm for replacement paths in directed graphs with positive edge weights. Given any e e [0, 1), our algorithm returns (1 + e)-approximate replacement paths in O(e-1 log2 n log(nC c)(m+n log n)) = O(m log(nC c) e) time, where C is the largest edge weight in the graph and c is the smallest weight. We also present an even faster (1 + e) approximate algorithm for the simpler problem of approximating the k shortest simple s - t paths in a directed graph with positive edge weights. That is, our algorithm outputs k different simple s - t paths, where the kth path we output is a (1 + e) approximation to the actual kth shortest simple s - t path. The running time of our algorithm is O(ke-1 log2 n(m + n log n)) = O(km e). The fastest exact algorithm for this problem has a running time of O(k(mn+n2 log log n)) = O(kmn) [8]. The previous best approximation algorithm was developed by Roditty [15]; it has a stretch of 3 2 and a running time of O(km√n) (it does not work for replacement paths). Note that all of our running times are nearly optimal except for the O (log(nC c)) factor in the replacements paths algorithm. Also, our algorithm can solve the variant of approximate replacement paths where we avoid vertices instead of edges.
Bernstein presented in @cite_21 a @math -approximate deterministic replacement paths algorithm which is near optimal (whose runtime is @math , where @math is the largest edge weight in the graph and @math is the smallest edge weight).