Complexity of the path avoiding forbidden pairs problem revisited
Let G = (V, E) be a directed acyclic graph with two distinguished vertices s, t and let F be a set of forbidden pairs of vertices. We say that a path in G is safe, if it contains at most one vertex from each pair {u, v} in F. Given G and F, the path avoiding forbidden pairs (PAFP) problem is to find a safe s-t path in G. We systematically study the complexity of different special cases of the PAFP problem defined according to the mutual positions of forbidden pairs. Fix one topological ordering of vertices; we say that pairs {u, v} and {x, y} are disjoint, if u, v < x, y, nested, if u < x, y < v, and halving, if u < x < v < y. The PAFP problem is known to be NP-hard in general or if no two pairs are disjoint; we prove that it remains NP-hard even when no two forbidden pairs are nested. On the other hand, if no two pairs are halving, the problem is known to be solvable in cubic time. We simplify and improve this result by showing an O(M(n)) time algorithm, where M(n) is the time to multiply two n \times n boolean matrices.
💡 Research Summary
The paper investigates the Path Avoiding Forbidden Pairs (PAFP) problem on directed acyclic graphs (DAGs). Given a DAG G = (V,E) with distinguished source s and sink t, together with a set F of forbidden vertex pairs, a path is called safe if it contains at most one vertex from each pair. The goal is to decide whether a safe s‑t path exists. The authors focus on how the relative positions of the forbidden pairs, with respect to a fixed topological order, affect computational complexity. Three basic relations between two pairs {u,v} and {x,y} (assuming u ≺ v, x ≺ y, and u ≺ x) are defined:
- Disjoint: u ≺ v ≺ x ≺ y.
- Nested: u ≺ x ≺ y ≺ v.
- Halving: u ≺ x ≺ v ≺ y.
Based on which relations are allowed, six non‑trivial families of instances arise: general, overlapping, ordered, well‑parenthesized, halving, and nested. Prior work had shown NP‑hardness for the general and overlapping cases, and polynomial‑time solvability for nested (via a special bio‑informatics formulation) and well‑parenthesized cases (via a cubic‑time algorithm).
New hardness result
The authors prove that the “ordered” family—where no two pairs are nested (i.e., only disjoint and halving relations may appear)—remains NP‑hard. The reduction is from 3‑SAT. For each variable they construct a block B (containing both the literal and its negation) and a block B′ (where the order of literals is reversed and a special vertex isolates the negated literal). Each clause is represented by three such blocks, one per literal, which are interleaved (“zipped”) so that any s‑t path must pass through exactly one block per clause, thereby selecting a satisfying literal. Forbidden pairs are added between corresponding literals in different blocks to enforce a consistent truth assignment across all clauses. Because all pairs are either disjoint or halving, the construction respects the ordered restriction, establishing NP‑hardness.
Algorithmic improvement
For the complementary case—instances with no halving pairs (i.e., the well‑parenthesized family)—the best known algorithm before this work ran in O(n³) time using a set of reduction rules (vertex contraction, edge removal, and forbidden‑pair elimination). The authors present a simpler dynamic‑programming approach that can be accelerated using fast Boolean matrix multiplication. They split the DAG into an “upper” and a “lower” region relative to each forbidden pair, encode reachability within each region as Boolean matrices, and compute the existence of a safe s‑t path via a sequence of matrix products. The overall running time becomes O(M(n)), where M(n) denotes the time to multiply two n × n Boolean matrices; with the current best exponent ω < 2.373, this yields a practical improvement over the cubic bound.
The matrix‑based method also extends naturally to related optimization problems: (i) finding an s‑t path that minimizes the number of violated forbidden pairs, and (ii) maximizing a weighted score where vertices, edges, and selected forbidden pairs contribute bonuses or penalties. Such extensions are motivated by applications in gene‑finding with RT‑PCR tests, where the underlying combinatorial structure matches the PAFP formulation.
Summary of contributions
- A systematic taxonomy of PAFP instances based on pair relations, summarized in a comprehensive table.
- Proof that the ordered case (no nested pairs) is NP‑hard, via a careful reduction from 3‑SAT using block gadgets and zipped clause constructions.
- An O(M(n)) algorithm for well‑parenthesized instances, improving upon the previous O(n³) bound and matching the best known matrix‑multiplication exponent.
- Discussion of how the same framework can handle more general objective functions, highlighting relevance to bio‑informatics problems such as peptide sequencing and gene reconstruction.
Overall, the paper deepens the theoretical understanding of the PAFP problem by delineating the exact boundary between tractable and intractable structural restrictions, and it delivers a practically faster algorithm for the largest known polynomial‑time solvable subclass.
Comments & Academic Discussion
Loading comments...
Leave a Comment