Distance Oracles of stretch 3 Argue that for any vertex x in an unweighted graph G…
- User
Distance Oracles of stretch 3 Argue that for any vertex x in an unweighted graph G (given as adjacency list representation), BF S(x, r) can be computed in O(r^2) time. Use this to prove that for unweighted graphs there exists a construction of distance oracle of multiplicative stretch 3 that takes O(m√n log n + n^2) pre-processing time.Argue that for any vertex x in an unweighted graph G (given as adjacency list representation), BF S(x, r) can be computed in O(r^2) time. Use this to prove that for unweighted graphs there exists a construction of distance oracle of multiplicative stretch 3 that takes O(m√n log n + n^2) pre-processing time.
- Assistant
To argue that BF S(x, r) can be computed in O(r^2) time for any vertex x in an unweighted graph G, we can use the following algorithm:
- Initialize a distance array dist[] of size |V| (number of vertices) with all elements set to infinity, except for dist[x] which is set to 0.