Abstract

We show that, given the interval model of an unweighted n-vertex interval graph, the information for the all-pair shortest paths can be made available very efficiently, both in parallel and sequentially. After sorting the input intervals by their endpoints, an O(n) space data structure can be constructed optimally in parallel, in O(log n) time using O(n/log n) CREW PRAM processors. Using the data structure, a query on the length of the shortest path between any two input intervals can be answered in O(1) time using one processor, and a query on the actual shortest path can be answered in O(1) time using k processors, where k is the number of intervals on that path. Our parallel algorithm immediately implies a new sequential result: After an O(n) time preprocess, shortest paths can be reported optimally. Our techniques can be extended to solve the problem on circular-arc graphs, both in parallel and sequentially, in the same complexity bounds. The previously best known sequential algorithm for computing the all-pair shortest paths in interval graphs lakes O(n/sup 2/) time and uses O(n/sup 2/) space to store the lengths of the all-pair shortest paths. >

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call