# Solving the 2-Disjoint Paths Problem in Nearly Linear Time

## Authors

- First Online:

- Received:

DOI: 10.1007/s00224-005-1256-9

- Cite this article as:
- Tholey, T. Theory Comput Syst (2006) 39: 51. doi:10.1007/s00224-005-1256-9

- 9 Citations
- 91 Views

## Abstract

Given four distinct vertices s_{1},s_{2},t_{1}, and t_{2} of a graph G, the
2-disjoint paths problem is to determine two disjoint paths, p_{1} from s_{1} to t_{1} and p_{2} from s_{2} to t_{2}, 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.