Abstract
Given four distinct vertices s1,s2,t1, and t2 of a graph G, the 2-disjoint paths problem is to determine two disjoint paths, p1 from s1 to t1 and p2 from s2 to t2, if such paths exist. Disjoint can mean vertex- or edge-disjoint. Both, the edge- and the vertex-disjoint version of the problem, are NP-hard in the case of directed graphs. For undirected graphs, we show that the O(mn)-time algorithm of Shiloach can be modified to solve the 2-vertex-disjoint paths problem in only O(n + mα(m,n)) time, where m is the number of edges in G, n is the number of vertices in G, and where α denotes the inverse of the Ackermann function. Our result also improves the running time for the 2-edge-disjoint paths problem on undirected graphs as well as the running times for the 2-vertex- and the 2-edge-disjoint paths problem on dags.
Similar content being viewed by others
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Tholey, T. Solving the 2-Disjoint Paths Problem in Nearly Linear Time. Theory Comput Syst 39, 51–78 (2006). https://doi.org/10.1007/s00224-005-1256-9
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-005-1256-9