Abstract
In a weighted, directed graph an L-bounded leg path is one whose constituent edges have length at most L. For any fixed L, computing L-bounded leg shortest paths is just as easy as the standard shortest path algorithm. In this paper we study approximate distance oracles (and reachability oracles) for bounded leg path problems, where the leg bound L is not known in advance, but forms part of the query. Bounded-leg path problems are more complicated than standard shortest path problems because the number of distinct shortest paths between two vertices (over all leg bounds) could be as large as the number of edges in the graph. The bounded leg constraint models situations where there is some limited resource that must be spent when traversing an edge. For example, the size of a fuel tank or the life of a battery places a hard limit on how far a vehicle can travel in one leg before refueling or recharging. Someone making a long road trip may place a hard limit on how many hours they are willing to drive in any one day. Our main result is a nearly optimal algorithm for preprocessing a directed graph in order to answer approximate bounded leg distance and bounded leg shortest path queries. In particular, we can preprocess any graph in O(n3) time, producing a data structure with size O(n2) that answers (1 + ∈)-approximate bounded leg distance queries in O(log log n) time. If the corresponding (1 + ∈)-approximate shortest path has l edges it can be returned in O(l log log n) time. These bounds are all within polylog(n) factors of the best standard all-pairs shortest path algorithm and improve substantially the previous best bounded leg shortest path algorithm, whose preprocessing time and space are O(n4) and O(n2.5). We also consider bounded leg oracles in other situations. In the context of planar directed graphs we give a time-space tradeoff for answering bounded leg reachability queries. For any k ≥ 2 we can build a data structure with size O(kn1+1/k) that answers reachability queries in time O(nk−1/2k).
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.