Papers
Topics
Authors
Recent
Search
2000 character limit reached

Min-2-DSP: Two Disjoint Shortest Paths

Updated 12 July 2026
  • Min-2-DSP is a graph problem that seeks two vertex-disjoint shortest paths while optimizing metrics like total weight or intersection based on distinct formulations.
  • The approach employs algebraic techniques—including permanent and hafnian computations—alongside dynamic programming and geometric methods to achieve polynomial-time solutions in undirected settings.
  • Advanced strategies leverage planarity, parallelism, and fixed-parameter methods to manage the complexity and nuances of directed graphs and varying disjointness constraints.

Searching arXiv for relevant papers on Min-2-DSP and closely related 2-DSP variants. Minimum 2-Disjoint Shortest Paths (Min-2-DSP) denotes a small family of closely related graph problems centered on two terminal pairs and shortest-path structure. In one common optimization form, the input is an undirected graph G=(V,E)G=(V,E) with nonnegative integer edge-weights w:ENw:E\to\mathbb{N} and two disjoint ordered terminal pairs (s1,t1)(s_1,t_1) and (s2,t2)(s_2,t_2); the task is to find vertex-disjoint paths P1P_1 from s1t1s_1\to t_1 and P2P_2 from s2t2s_2\to t_2 minimizing w(P1)+w(P2)w(P_1)+w(P_2) (Hirai et al., 2016). In a second, equally common formulation, often written 2-DSP, each PiP_i must itself be a shortest w:ENw:E\to\mathbb{N}0-w:ENw:E\to\mathbb{N}1 path, and the algorithmic task is to decide, count, or construct a disjoint pair (Gottschau et al., 2018). More recent work also uses the name Min-2-DSP for minimizing w:ENw:E\to\mathbb{N}2 over shortest-path choices w:ENw:E\to\mathbb{N}3, w:ENw:E\to\mathbb{N}4 (Choudhary et al., 18 Sep 2025). The literature therefore combines algebraic reductions to matchings and cycle covers, dynamic programming on shortest-path substructures, planar Pfaffian techniques, geometric decompositions, and highly parallel modulo-w:ENw:E\to\mathbb{N}5 computation.

1. Formulations and complexity landscape

The three main formulations differ in objective and in the role of shortestness. The total-length optimization form minimizes the sum of two disjoint path lengths for prescribed terminal pairs. The feasibility form requires each path to be individually shortest for its own pair and asks whether such a disjoint pair exists. The minimum-intersection form fixes shortestness first and minimizes the number of shared vertices.

Formulation Core requirement Representative results
Total-length optimization Minimize w:ENw:E\to\mathbb{N}6 over disjoint w:ENw:E\to\mathbb{N}7 Randomized polynomial time in undirected graphs (Hirai et al., 2016)
2-DSP feasibility Each w:ENw:E\to\mathbb{N}8 is a shortest w:ENw:E\to\mathbb{N}9-(s1,t1)(s_1,t_1)0 path and (s1,t1)(s_1,t_1)1 are disjoint Polynomial time for (s1,t1)(s_1,t_1)2, then for any fixed (s1,t1)(s_1,t_1)3 in undirected graphs (Gottschau et al., 2018, Lochet, 2019)
Minimum intersection of shortest paths Minimize (s1,t1)(s_1,t_1)4 over shortest-path choices (s1,t1)(s_1,t_1)5 in directed graphs with positive edge weights; (s1,t1)(s_1,t_1)6 in DAGs and undirected graphs (Choudhary et al., 18 Sep 2025)

For the feasibility formulation, the (s1,t1)(s_1,t_1)7-Disjoint Shortest Paths problem is NP-complete if (s1,t1)(s_1,t_1)8 is part of the input, while the case (s1,t1)(s_1,t_1)9 is polynomially solvable on undirected graphs with strictly positive lengths and remains polynomial when zero edge lengths are allowed (Gottschau et al., 2018). Lochet later showed that for any fixed (s2,t2)(s_2,t_2)0, the undirected disjoint shortest paths problem admits a polynomial-time algorithm, and for any fixed (s2,t2)(s_2,t_2)1 the algorithm extends to the case where each path connecting (s2,t2)(s_2,t_2)2 has length at most (s2,t2)(s_2,t_2)3 (Lochet, 2019). By contrast, directed generalizations are substantially harder: directed graphs with zero lengths already yield NP-hardness for (s2,t2)(s_2,t_2)4, and in the total-length optimization setting the problem is NP-hard in directed graphs even for two pairs (Gottschau et al., 2018, Datta et al., 2021).

This multiplicity of definitions is a recurrent source of confusion. In some papers, “shortest two disjoint paths” means minimizing total length of a disjoint pair; in others it means disjointness among individually shortest paths; and in recent directed work “Min-2-DSP” may denote minimum intersection among shortest paths (Hirai et al., 2016, Choudhary et al., 18 Sep 2025). The distinction matters because the available techniques, tractability frontiers, and output guarantees differ sharply across the three settings.

2. Algebraic optimization via permanents, hafnians, and isolation

A central line of work treats the total-length optimization problem by encoding disjoint path packings as matchings. Björklund and Husfeldt gave the first randomized polynomial-time algorithm for Min-2-DSP by reducing the problem to computing a permanent modulo (s2,t2)(s_2,t_2)5 and applying the Mulmuley–Vazirani–Vazirani Isolation Lemma. The framework uses Gallai’s reduction to transform two vertex-disjoint (s2,t2)(s_2,t_2)6- and (s2,t2)(s_2,t_2)7-paths into a perfect matching in an auxiliary graph (s2,t2)(s_2,t_2)8 of size (s2,t2)(s_2,t_2)9, assigns formal edge-weights P1P_10, and reads the minimum total weight from the lowest-degree surviving monomial after random perturbation makes the optimum unique with probability at least P1P_11 (Hirai et al., 2016).

Hirai and Namba generalized this framework from two terminal pairs to the shortest perfect P1P_12-path packing problem. Their key replacement is hafnian computation modulo powers of two. For a symmetric P1P_13 matrix P1P_14, the hafnian is

P1P_15

so in the P1P_16-P1P_17 adjacency case it counts perfect matchings. Using Gallai’s reduction, they build a symmetric matrix P1P_18 with entries P1P_19 on auxiliary edges, obtaining

s1t1s_1\to t_10

which enumerates disjoint s1t1s_1\to t_11-path packings. Their theorem states that for fixed s1t1s_1\to t_12, hafnians modulo s1t1s_1\to t_13 of polynomial-entry symmetric matrices can be computed in polynomial time, with a recursion that lifts s1t1s_1\to t_14 computation—where the hafnian equals the Pfaffian—to higher powers of two (Hirai et al., 2016).

For Min-2-DSP, this yields a randomized polynomial-time algorithm with s1t1s_1\to t_15. One builds the Gallai graph s1t1s_1\to t_16, perturbs each original edge weight by a random offset s1t1s_1\to t_17, forms the symmetric matrix s1t1s_1\to t_18, computes s1t1s_1\to t_19, extracts the smallest exponent P2P_20 with nonzero coefficient, and then recovers the actual optimal paths by deleting edges one by one and recomputing the minimum degree. The running time remains polynomial because P2P_21 is constant. The same method extends to shortest perfect P2P_22-path packing when P2P_23 is constant, with running time P2P_24, but ceases to be polynomial when P2P_25 grows with P2P_26; indeed, the general P2P_27-path packing problem is NP-hard when P2P_28 is unbounded (Hirai et al., 2016).

The significance of this line is twofold. First, it established that the total-length two-pair problem in undirected graphs is not only reducible to matching structure, but reducible in a way compatible with low-modulus algebra. Second, it exposed a precise limitation: the approach is effective when the number of terminal endpoints participating in the path-packing pattern is fixed, but not when that parameter scales.

3. Dynamic programming and structural algorithms for disjoint shortestness

For the feasibility version in undirected graphs with nonnegative lengths, Gottschau and coauthors developed a polynomial-time dynamic program that explicitly accommodates zero-length edges. The algorithm computes distance labels P2P_29, defines shortest-path networks

s2t2s_2\to t_20

orients each s2t2s_2\to t_21 from smaller to larger s2t2s_2\to t_22-value, leaves zero-length edges undirected, and replaces edges that lie in both s2t2s_2\to t_23 and s2t2s_2\to t_24 with opposite preferred directions by a gadget of four vertices and three arcs. In the resulting mixed graph s2t2s_2\to t_25, the weakly connected components of s2t2s_2\to t_26 are processed in nondecreasing order of s2t2s_2\to t_27, while a binary relation s2t2s_2\to t_28 is updated by

s2t2s_2\to t_29

The total procedure is polynomial, with an implementation bound stated as w(P1)+w(P2)w(P_1)+w(P_2)0 or better for w(P1)+w(P2)w(P_1)+w(P_2)1 (Gottschau et al., 2018).

Lochet’s later fixed-w(P1)+w(P2)w(P_1)+w(P_2)2 algorithm introduced a different structural view. For w(P1)+w(P2)w(P_1)+w(P_2)3, it begins by constructing a 2-shortest graph w(P1)+w(P2)w(P_1)+w(P_2)4 via two BFS layerings from w(P1)+w(P2)w(P_1)+w(P_2)5 and w(P1)+w(P2)w(P_1)+w(P_2)6, discarding edges that do not connect consecutive levels in at least one layering. Each remaining edge is of colour w(P1)+w(P2)w(P_1)+w(P_2)7, colour w(P1)+w(P2)w(P_1)+w(P_2)8, or both; orienting each colour class yields acyclic digraphs w(P1)+w(P2)w(P_1)+w(P_2)9 and PiP_i0. The bi-coloured edges decompose into connected components with strong contiguity and conflict properties: if PiP_i1 is a colour-PiP_i2 path and PiP_i3 is a bi-coloured component, then PiP_i4 is a single contiguous subpath, and if two paths conflict on such a component then that component is the only place they can meet. The notion of a blind pair—neither path “sees” the other through an internal suffix intersection—permits a reduction to a product-state digraph. For PiP_i5, Lemma 12 gives partitions into at most PiP_i6 subpaths per original path, and the resulting state graph has size PiP_i7, yielding polynomial time (Lochet, 2019).

A third viewpoint, due to the geometric-lens framework, specializes to the unit-length undirected case and improves the PiP_i8 running time to PiP_i9. Each vertex w:ENw:E\to\mathbb{N}00 is mapped to

w:ENw:E\to\mathbb{N}01

Shortest-path geometry is then studied through diamonds w:ENw:E\to\mathbb{N}02, coloured monotonicity, and the continuous drawings w:ENw:E\to\mathbb{N}03 of shortest paths. Two paths are handled by a three-case split: disjoint drawings, a non-integer crossing, or an integer-coordinate crossing. In the crossing cases, a constant number of “marble” vertices—w:ENw:E\to\mathbb{N}04—divide the paths into monotone pieces lying in disjoint diamonds, and each guessed configuration reduces to disjoint paths in a DAG. The total cost is w:ENw:E\to\mathbb{N}05 on unit-length graphs (Bentert et al., 2020).

Taken together, these results show that the 2-DSP feasibility problem admits several radically different decompositions: mixed-graph component sweeps for nonnegative weights including zeros, shortest-layer product states for fixed w:ENw:E\to\mathbb{N}06, and coordinate geometry for unweighted graphs. The common theme is that shortestness severely constrains admissible path interactions, and those constraints can be turned into dynamic-programming state reductions.

4. Planar, Pfaffian, and fixed-parameter methods

Planarity enables a separate family of techniques based on perfect matching counting and topological structure. In cubic planar graphs with two terminal pairs, Björklund and Husfeldt showed that there are NC algorithms, uniform circuits of polynomial size and polylogarithmic depth, that compute the shortest two disjoint paths problem and also output the number of optimum solutions. The reduction replaces each nonterminal vertex by a triangle gadget, each terminal by a 3-star gadget, and for each even subset w:ENw:E\to\mathbb{N}07 forms a planar subgraph w:ENw:E\to\mathbb{N}08. With an indeterminate w:ENw:E\to\mathbb{N}09, external edges receive weight w:ENw:E\to\mathbb{N}10, internal gadget edges weight w:ENw:E\to\mathbb{N}11, and Kasteleyn orientations give skew-symmetric matrices w:ENw:E\to\mathbb{N}12 satisfying

w:ENw:E\to\mathbb{N}13

An alternating-sum polynomial w:ENw:E\to\mathbb{N}14 cancels all unwanted pairings, and when w:ENw:E\to\mathbb{N}15 its degree is w:ENw:E\to\mathbb{N}16, so interpolation needs only five evaluations (Björklund et al., 2018).

A closely related determinant-based cancellation framework applies to planar graphs whose four terminals lie on a single face. There, three outerplanar pairings w:ENw:E\to\mathbb{N}17 are considered, and the signed combination

w:ENw:E\to\mathbb{N}18

cancels all monomials not corresponding to the designated pairing w:ENw:E\to\mathbb{N}19. This yields a randomized or deterministic sequential algorithm of w:ENw:E\to\mathbb{N}20 time for the decision problem, w:ENw:E\to\mathbb{N}21 for counting, and NCw:ENw:E\to\mathbb{N}22 algorithms for decision and counting; the search version lies in RNCw:ENw:E\to\mathbb{N}23 after isolation is used to force uniqueness (Datta et al., 2018).

Recent planar parameterized work replaces determinant cancellation by topological enumeration. For planar disjoint shortest paths with positive edge weights, the input graph is embedded in the plane, all terminals lie on the outer face, and the algorithm constructs a geodesic Steiner tree spanning the terminals, computes an exhaustive set of maximal DAG-rings around that tree, proves w:ENw:E\to\mathbb{N}24 bounds on non-trivial crossings when w:ENw:E\to\mathbb{N}25, and enumerates only w:ENw:E\to\mathbb{N}26 homology classes before reducing each case to Schrijver’s polynomial-time Homology Feasibility problem. The general running time is w:ENw:E\to\mathbb{N}27, so substituting w:ENw:E\to\mathbb{N}28 yields polynomial time (Pilipczuk et al., 6 May 2025).

These planar results are not merely faster implementations of general methods. They rely on structure unavailable outside planar embeddings: Kasteleyn orientations, Pfaffian counting, dual cycles bounding rings, and homology classes of linkages. They also illustrate that terminal placement assumptions are consequential. Some algorithms require cubic planarity, others one-face placement, and the fixed-parameter result assumes all terminals on the outer face (Björklund et al., 2018, Datta et al., 2018, Pilipczuk et al., 6 May 2025).

5. Parallelism, linear-time detection, and directed-graph advances

Parallel complexity entered the subject through modulo-w:ENw:E\to\mathbb{N}29 permanent computation. A 2021 result showed that for fixed w:ENw:E\to\mathbb{N}30, the permanent modulo w:ENw:E\to\mathbb{N}31 of a matrix of univariate integer polynomials lies in ParityL, hence in NCw:ENw:E\to\mathbb{N}32. The paper reformulates shortest 2-disjoint paths as a special case of finding disjoint cycles through designated pattern edges. After adding dummy vertices w:ENw:E\to\mathbb{N}33, loops of weight w:ENw:E\to\mathbb{N}34, and opposite arcs labeled w:ENw:E\to\mathbb{N}35, a small family of pattern graphs w:ENw:E\to\mathbb{N}36 yields a polynomial

w:ENw:E\to\mathbb{N}37

whose lowest nonzero monomial identifies the optimum after random isolation. This places the general undirected problem into a highly parallel randomized setting, and with advice into ParityL/poly (Datta et al., 2021).

A different algebraic development produced optimal linear-time detection for the 2-DSP feasibility problem on weighted undirected graphs and DAGs. The key object is a polynomial

w:ENw:E\to\mathbb{N}38

where w:ENw:E\to\mathbb{N}39 ranges over pairs of shortest-path candidates in the shortest-path DAGs and w:ENw:E\to\mathbb{N}40 is the product of edge variables along both paths. Over a field of characteristic two, the polynomial is decomposed as w:ENw:E\to\mathbb{N}41, and a sequence of subpath-swapping involutions cancels all intersecting contributions in linear time. In DAGs, the cancellation is indexed by the first meeting vertex w:ENw:E\to\mathbb{N}42; in undirected graphs, intersecting pairs are partitioned into agreeing and disagreeing types. Random evaluation over w:ENw:E\to\mathbb{N}43 then yields an w:ENw:E\to\mathbb{N}44-time algorithm for detection, but not for search. The paper states that one can obtain a search algorithm in w:ENw:E\to\mathbb{N}45 time via Baur–Strassen and edge-peeling (Akmal et al., 2024).

Directed graphs remained more difficult. A 2025 result gave an w:ENw:E\to\mathbb{N}46-time algorithm for 2-DSP in weighted directed graphs without negative or zero weight cycles, improving a previously known w:ENw:E\to\mathbb{N}47 bound. The same paper defines Min-2-DSP as minimizing the number of vertex intersections between a shortest w:ENw:E\to\mathbb{N}48-w:ENw:E\to\mathbb{N}49 path and a shortest w:ENw:E\to\mathbb{N}50-w:ENw:E\to\mathbb{N}51 path, and gives the first efficient algorithms for that objective: w:ENw:E\to\mathbb{N}52 time in directed graphs with positive edge weights and w:ENw:E\to\mathbb{N}53 time in DAGs and undirected graphs, with w:ENw:E\to\mathbb{N}54 reporting in the directed case and w:ENw:E\to\mathbb{N}55 reporting in DAGs and undirected graphs once the optimum is known (Choudhary et al., 18 Sep 2025).

These results refine the algorithmic map in two directions. First, they show that parallelism is compatible with the older algebraic isolation-based methods. Second, they separate detection from construction: linear-time algebraic cancellation currently decides 2-DSP in undirected graphs and DAGs, but does not by itself yield equally fast path output (Datta et al., 2021, Akmal et al., 2024).

Several nearby problems illuminate what is special about Min-2-DSP. The classical directed single-source, single-target version with two edge-disjoint paths of minimum total cost is solved by the Suurballe–Tarjan method in w:ENw:E\to\mathbb{N}56 time: one shortest-path tree is reweighted by reduced costs, residual tree edges are reversed at zero cost, a second Dijkstra run finds an augmenting walk, and cancellation of antiparallel pairs yields two minimum-cost disjoint paths. The same construction gives a single-source 2-multipath preserver with exactly w:ENw:E\to\mathbb{N}57 edges (Bilò et al., 2021). This problem is often used as a baseline, but it differs substantially from the two-pair disjoint shortest-path formulations.

Weights are another sharp boundary. In the undirected 2-DSP feasibility problem, zero edge lengths can be handled polynomially by the mixed-graph dynamic program described above, but in directed graphs zero lengths lead to NP-hardness for w:ENw:E\to\mathbb{N}58 (Gottschau et al., 2018). For a same-terminal-pair total-weight problem with conservative weights, negative edges already cause NP-hardness in general, yet if the negative-weight edges form only a constant number w:ENw:E\to\mathbb{N}59 of trees, an w:ENw:E\to\mathbb{N}60-time algorithm exists. That algorithm combines minimum-cost flow for separable solutions, recursion on the number of negative trees, and dynamic programming on a single negative tree (Schlotter, 2023).

Parameter dependence remains delicate. The fixed-w:ENw:E\to\mathbb{N}61 undirected polynomial algorithm for disjoint shortest paths shows that constant w:ENw:E\to\mathbb{N}62 is tractable in full generality (Lochet, 2019), but the geometric-lens paper also proves that w:ENw:E\to\mathbb{N}63-DSP is W[1]-hard with respect to w:ENw:E\to\mathbb{N}64 (Bentert et al., 2020). Planarity changes that picture: planar disjoint shortest paths with positive edge weights becomes fixed-parameter tractable with running time w:ENw:E\to\mathbb{N}65 (Pilipczuk et al., 6 May 2025). On the algebraic optimization side, the hafnian framework for shortest perfect w:ENw:E\to\mathbb{N}66-path packing is polynomial only when w:ENw:E\to\mathbb{N}67 is fixed; when the terminal set is unbounded, the problem is NP-hard (Hirai et al., 2016).

A final recurrent distinction is between edge-disjointness and vertex-disjointness. Some papers work directly with edge-disjoint shortest paths, others with vertex-disjoint paths, and several note that a minor variant handles vertex-disjointness by splitting vertices in advance, or that edge-disjoint variants are completely analogous (Gottschau et al., 2018, Datta et al., 2021). This does not make the two notions interchangeable, but it explains why techniques developed for one model often migrate quickly to the other.

Across these variants, the subject has developed from isolated polynomial-time results for w:ENw:E\to\mathbb{N}68 into a landscape with exact algebraic counting, component-wise dynamic programming, planar NC computation, fixed-parameter topological methods, and linear-time randomized detection. The enduring difficulties are equally clear: directed graphs remain harder than undirected ones, search is harder than detection, and the notational label “Min-2-DSP” itself has not stabilized across the literature.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Minimum 2-Disjoint Shortest Paths (Min-2-DSP).