All-pairs disjoint paths from a common ancestor in Õ(nω) time

  • Authors:
  • Raphael Yuster

  • Affiliations:
  • Department of Mathematics, University of Haifa, Haifa 31905, Israel

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2008

Quantified Score

Hi-index 5.23

Visualization

Abstract

A common ancestor of two vertices u,v in a directed acyclic graph is a vertex w that can reach both. A {u,v}-junction is a common ancestor w so that there are two paths, one from w to u and the other from w to v, that are internally vertex-disjoint. A lowest common ancestor (LCA) of u and v is a common ancestor w so that no other common ancestor of u and v is reachable from w. Every {u,v}-LCA is a {u,v}-junction, but the converse is not true. Similarly, not every common ancestor is a junction. The all-pairs common ancestor (APCA) problem computes (or determines the non-existence of) a common ancestor for all pairs of vertices. Similarly defined are the all-pairs junction (APJ) and the all-pairs LCA (APLCA) problems. The APCA problem also has an existence version. Bender et al. obtained an algorithm for APCA existence by reduction to transitive closure. Their algorithm runs in O@?(n^@w) time where @w=2, the k-APCA and the k-APLCA problems are to find, respectively, a common ancestor and a lowest common ancestor for each k-set of vertices. We prove that for all fixed k=8, the k-APCA problem can be solved in O@?(n^k) time, thereby obtaining an essentially optimal algorithm. We also prove that for all k=4, the k-APLCA problem can be solved in O@?(n^k^+^1^/^2) time.