Table of Contents
Fetching ...

Faster Algorithms for Dual-Failure Replacement Paths

Shiri Chechik, Tianyi Zhang

TL;DR

The paper tackles the dual-failure replacement paths problem in directed graphs, presenting both a subcubic combinatorial algorithm for unweighted digraphs and a faster algebraic method for weighted digraphs with small integer weights. The combinatorial result leverages path segmentation, random pivot sets, and carefully constructed shortcut graphs, along with truncated Dijkstra and canonical path properties, to achieve a runtime of $ ilde{O}(n^{3-1/18})$ without using fast matrix multiplication. The algebraic approach extends to weights in $\\{-M,\ldots, M\}\$ and attains $ ilde{O}(M n^{2.8716})$ by dividing the canonical $s$–$t$ path into segments of length $L$ and building compact sketches that encode replacement paths, enabling fast matrix-multiplication-based distance computations. Together, these results close the gap identified by prior work, showing subcubic performance is attainable both combinatorially (unweighted) and algebraically (weighted), with implications for distance sensitivity and replacement-path computations in networks. The techniques blend structural path decompositions, pivot-based reductions, and carefully engineered sketch graphs to capture two-edge failures efficiently.

Abstract

Given a simple weighted directed graph $G = (V, E, ω)$ on $n$ vertices as well as two designated terminals $s, t\in V$, our goal is to compute the shortest path from $s$ to $t$ avoiding any pair of presumably failed edges $f_1, f_2\in E$, which is a natural generalization of the classical replacement path problem which considers single edge failures only. This dual failure replacement paths problem was recently studied by Vassilevska Williams, Woldeghebriel and Xu [FOCS 2022] who designed a cubic time algorithm for general weighted digraphs which is conditionally optimal; in the same paper, for unweighted graphs where $ω\equiv 1$, the authors presented an algebraic algorithm with runtime $\tilde{O}(n^{2.9146})$, as well as a conditional lower bound of $n^{8/3-o(1)}$ against combinatorial algorithms. However, it was unknown in their work whether fast matrix multiplication is necessary for a subcubic runtime in unweighted digraphs. As our primary result, we present the first truly subcubic combinatorial algorithm for dual failure replacement paths in unweighted digraphs. Our runtime is $\tilde{O}(n^{3-1/18})$. Besides, we also study algebraic algorithms for digraphs with small integer edge weights from $\{-M, -M+1, \cdots, M-1, M\}$. As our secondary result, we obtained a runtime of $\tilde{O}(Mn^{2.8716})$, which is faster than the previous bound of $\tilde{O}(M^{2/3}n^{2.9144} + Mn^{2.8716})$ from [Vassilevska Williams, Woldeghebriela and Xu, 2022].

Faster Algorithms for Dual-Failure Replacement Paths

TL;DR

The paper tackles the dual-failure replacement paths problem in directed graphs, presenting both a subcubic combinatorial algorithm for unweighted digraphs and a faster algebraic method for weighted digraphs with small integer weights. The combinatorial result leverages path segmentation, random pivot sets, and carefully constructed shortcut graphs, along with truncated Dijkstra and canonical path properties, to achieve a runtime of without using fast matrix multiplication. The algebraic approach extends to weights in and attains by dividing the canonical path into segments of length and building compact sketches that encode replacement paths, enabling fast matrix-multiplication-based distance computations. Together, these results close the gap identified by prior work, showing subcubic performance is attainable both combinatorially (unweighted) and algebraically (weighted), with implications for distance sensitivity and replacement-path computations in networks. The techniques blend structural path decompositions, pivot-based reductions, and carefully engineered sketch graphs to capture two-edge failures efficiently.

Abstract

Given a simple weighted directed graph on vertices as well as two designated terminals , our goal is to compute the shortest path from to avoiding any pair of presumably failed edges , which is a natural generalization of the classical replacement path problem which considers single edge failures only. This dual failure replacement paths problem was recently studied by Vassilevska Williams, Woldeghebriel and Xu [FOCS 2022] who designed a cubic time algorithm for general weighted digraphs which is conditionally optimal; in the same paper, for unweighted graphs where , the authors presented an algebraic algorithm with runtime , as well as a conditional lower bound of against combinatorial algorithms. However, it was unknown in their work whether fast matrix multiplication is necessary for a subcubic runtime in unweighted digraphs. As our primary result, we present the first truly subcubic combinatorial algorithm for dual failure replacement paths in unweighted digraphs. Our runtime is . Besides, we also study algebraic algorithms for digraphs with small integer edge weights from . As our secondary result, we obtained a runtime of , which is faster than the previous bound of from [Vassilevska Williams, Woldeghebriela and Xu, 2022].
Paper Structure (61 sections, 17 theorems, 66 equations, 19 figures)

This paper contains 61 sections, 17 theorems, 66 equations, 19 figures.

Key Result

Theorem 1.1

Given a simple unweighted directed graph $G = (V, E)$ on $n$ vertices, and fix any pair of vertices $s, t\in V$, the values of all dual-failure replacement path distances $\mathsf{dist}(s, t, G\setminus\{f_1, f_2\}), \forall f_1, f_2\in E$ can be computed in $\tilde{O}(n^{3-1/18})$ time with high pr

Figures (19)

  • Figure 1: For simplicity, let us assume that when $f_1$ falls on the sub-paths $\pi[s_i, t_i]$, the dual-failure replacement path also passes through $s_i, t_i$. In this picture, the two cyan dual-failure replacement paths have length less than $L$, and we will show that they are vertex-disjoint. The orange dual-failure replacement path has length at least $L$, and so it hits a vertex $p\in U$ with high probability; in this case, we will compute single-source single-failure replacement paths to and from $p$ in graph $G\setminus E(\pi)$ to help us compute dual-failure replacement paths.
  • Figure 2: The cyan path is the detour $\alpha_i$ that avoids $e_i$, and the orange path is the detour $\gamma_i$ that avoids $f_i$ which lies on $\alpha_i$. Via some case analysis, we will show the difficult case is that $|\alpha_i| < L$.
  • Figure 3: For two well-separated edges $e_i, e_j$ such that $|\pi(e_i, e_j)| \geq 10g$, if both $|\gamma_i|, |\gamma_j|$ are less than $g$, and $f_i, f_j$ are roughly at the same height (i.e., $|\alpha_i[a_i, f_i)|\approx |\alpha_j[a_j, f_j)|$), then we can show that the two dual-failure detours $\gamma_i, \gamma_j$ are vertex-disjoint.
  • Figure 4: A shortcut graph that helps computing the dual-failure detour $\gamma_i$ avoiding $\{f_i, g_i\}$, which consists of vertices in $U\cup\bigcup_{j=i-10g}^{i+10g}V(\beta^j_h)$. This shortcut graph includes all edges in $\bigcup_{j=i-10g}^{i+10g}E(\beta^j_h)\setminus E(\beta^i_h)$, and some shortcut edges representing distances to and from $U$ in $G_h$; actually, it will also contain some shortcut edges between vertices in $\bigcup_{j=i-10g}^{i+10g}V(\beta^j_h)$ which we have not discussed in the overview.
  • Figure 5: When $f_1, f_2$ lie in different sub-paths $\gamma_i, \gamma_j$ such that $j-i>1$, we can show that $\rho$ must contain a vertex in $U$ with high probability. Then we can apply the algorithm from chechik2020near to compute single-source replacement path from $p$ in graph $G\setminus E(\gamma_i)$ to learn about the sub-path $\rho[p, x]$ which contains the backward path in the middle.
  • ...and 14 more figures

Theorems & Definitions (51)

  • Theorem 1.1
  • Theorem 1.2
  • Definition 2.1: williams2022algorithms
  • Lemma 2.1
  • Lemma 2.2: roditty2005replacement
  • Lemma 2.3
  • Lemma 2.4: chechik2020near
  • Lemma 2.5: dijkstra2022note
  • Lemma 2.6: bernstein2022negative
  • Lemma 2.7: zwick2002all
  • ...and 41 more