cs.DS — Data Structures and Algorithms
Near-Linear Preprocessing for Reachability After Two Vertex Failures in DAGs and Reducible Flowgraphs
We construct a single-source reachability oracle for directed acyclic graphs and reducible flowgraphs. After preprocessing, a query specifies a target and up to two failed vertices and asks whether a path to the target survives. For vertices and arcs, the deterministic construction takes time and working words. The oracle retains words and answers in worst-case time. The construction groups vertices by their immediate dominator. Within each group, the pairs whose deletion disconnects another vertex form a forest. An identity for exits from dominator subtrees reduces a query to a constant number of tree-path extrema. The same preprocessing bound gives a subgraph with at most four incoming arcs per vertex preserving all two-failure answers. When the target is fixed before preprocessing, we obtain the same space and query bounds for three arbitrary vertex failures. A Lean 4 formalization of Theorem 1.1, including its resource bounds, is registered with Palomar.