Layer-Based Width for PAFP

2026-05-12Data Structures and Algorithms

Data Structures and AlgorithmsDiscrete Mathematics
AI summary

The authors study a problem called Path Avoiding Forbidden Pairs (PAFP), which asks if there is a path from one point to another in a directed graph that doesn't include both vertices from any forbidden pair. They introduce a way to measure the graph's structure called BFS-width and show that the problem can be solved efficiently if this measure and a related backward-arc count are small. They also prove that if these conditions are relaxed, the problem remains hard. Additionally, they find efficient solutions for special types of graphs with layers defined by exact path lengths. Their work focuses on input graphs without limiting forbidden pairs, unlike previous work.

Directed graphPath Avoiding Forbidden Pairs (PAFP)Forbidden pairsBreadth-First Search (BFS) layerBFS-widthFixed-parameter tractability (FPT)DAG (Directed Acyclic Graph)Exact-length layersNP-completeness2-SAT encoding
Authors
Samuel German
Abstract
The Path Avoiding Forbidden Pairs problem (PAFP) asks whether, in a directed graph $G$ with terminals $s,t$ and a set $\mathcal{F}$ of forbidden vertex pairs, there is an $s$-$t$ path that contains at most one endpoint from each forbidden pair. We initiate the study of PAFP through a layer-based width measure. Our first focus is the union digraph $G\cup\mathcal{F}$, obtained by adding to $G$ one arc per forbidden pair, oriented according to a fixed reachability-compatible order. Let the BFS layer $L_d$ be all vertices at directed shortest-path distance $d$ from $s$, where the BFS-width from $s$ is $\max_d |L_d|$. We show if $G\cup\mathcal{F}$ has BFS-width $b$ from $s$ and only $β$ arcs going from a later BFS layer to an earlier one, then PAFP is FPT parameterized by $b+β$. The backward-arc hypothesis is essential: we show PAFP remains NP-complete when the union digraph is a DAG with BFS-width 2. We also show if the input DAG has BFS-width at most $2$ and only $k$ backward input arcs, then PAFP can be decided in $2^k |I|^{O(1)}$ time, with unrestricted forbidden pairs. This width-$2$ result is tight: inspection of a classical reduction shows NP-completeness on input DAGs of BFS-width $3$ with no backward input arcs. Moreover, we study exact-length layers in the input graph, where the $d$-th layer consists of the vertices reachable from $s$ by a directed path of length exactly $d$. For DAGs of exact-length width at most $2$, we show PAFP is polynomial-time decidable by a 2-SAT encoding of fixed-length paths. This bound is tight: the same classical reduction yields NP-completeness on DAGs of exact-length width $3$. Unlike previously known polynomial-time regimes for PAFP, which restrict the forbidden-pair set in order to obtain tractability, our two input-graph tractability results allow unrestricted forbidden pairs and input graphs with exponentially many $s$-$t$ paths.