Efficient algorithms for measuring the funnel-likeness of DAGs

Marcelo Garlet Millani, Hendrik Molter, Rolf Niedermeier, Manuel Sorge

Abstract

Funnels are a new natural subclass of DAGs. Intuitively, a DAG is a funnel if every source-sink path can be uniquely identified by one of its arcs. Funnels are an analog to trees for directed graphs that is more restrictive than DAGs but more expressive than in-/out-trees. Computational problems such as finding vertex-disjoint paths or tracking the origin of memes remain NP-hard on DAGs while on funnels they become solvable in polynomial time. Our main focus is the algorithmic complexity of finding out how funnel-like a given DAG is. To this end, we study the NP-hard problem of computing the arc-deletion distance to a funnel of a given DAG. We develop efficient exact and approximation algorithms for the problem and test them on synthetic random graphs and real-world graphs.

Introduction

Directed Acyclic Graphs (DAGs) are ubiquitous in computer science, used to model everything from task scheduling to causal relationships. While many problems are computationally easy on trees, they often become NP-hard on general DAGs. This paper introduces funnels, a novel subclass of DAGs that strikes a "Goldilocks" balance: more expressive than simple trees but structured enough to allow for efficient computation.

A DAG is defined as a funnel if every path from a source to a sink contains at least one "private" arc—an arc that does not appear in any other source-sink path. This property effectively limits the "path explosion" that complicates algorithms on general DAGs.

A sample funnel DAG illustrating the private arc property where each source-sink path is uniquely identifiable.

Structural Characterization and the ADDF Problem

The structural core of a funnel lies in its Fork/Merge duality. A funnel can be partitioned into an "out-forest" (where vertices have indegree $\le 1$) and an "in-forest" (where vertices have outdegree $\le 1$). Intuitively, paths in a funnel "fork" out from sources and eventually "merge" into sinks without creating the complex interweaving found in general DAGs.

To measure how close a given graph is to this ideal structure, the authors define the Arc-Deletion Distance to a Funnel (ADDF) problem. This involves finding the minimum number of arcs that must be removed from a DAG to transform it into a funnel.

Algorithmic Approaches

The paper establishes that ADDF is NP-hard, a result proven via a reduction from the 3-SAT problem. This complexity necessitates the development of both approximation and exact parameterized algorithms.

The reduction from 3-SAT to the ADDF problem, demonstrating the inherent complexity of measuring funnel-likeness.
  1. Factor-2 Approximation: Utilizing a greedy "FM-labeling" (Fork/Merge) technique, the authors developed a linear-time algorithm. By labeling vertices as either part of a forking or merging structure, they achieve a solution guaranteed to be within twice the optimal distance.
  2. Fixed-Parameter Tractability (FPT): For graphs that are "almost" funnels (where the distance $d$ is small), an exact search-tree algorithm is provided. With a running time of $O(3^d \cdot (|V| + |A|))$, the complexity scales with the graph's "messiness" rather than its total size.

Experimental Evaluation

The algorithms were evaluated on synthetic "planted" funnels and real-world datasets from the Konect database and Arch Linux package dependencies.

  • Efficiency: The factor-2 approximation is remarkably fast, typically finishing in under 72ms for graphs with 1,000 vertices.
  • Accuracy: In practice, the approximation performed significantly better than its theoretical bound, often yielding results within a factor of 1.16 of the optimum.
  • Scalability: The FPT algorithm solved 98% of synthetic test instances within 10 minutes, proving its viability for practical structural analysis.

Conclusion

Funnels represent a promising new tool for graph theory and algorithm design. By providing a way to measure and exploit "funnel-likeness," this research opens the door to solving complex problems on real-world DAGs that are nearly, but not perfectly, simple. Future work may explore vertex-deletion variants and the potential for funnel-likeness to serve as a new "width" measure for directed graphs.

Summary updated

Abstract

We propose funnels as a new natural subclass of DAGs. Intuitively, a DAG is a funnel if every source-sink path can be uniquely identified by one of its arcs. Funnels are an analogue to trees for directed graphs, being more restrictive than DAGs but more expressive than mere in-/out-trees. Computational problems such as finding vertex-disjoint paths or tracking the origin of memes remain NP-hard on DAGs while on funnels they become solvable in polynomial time. Our main focus is the algorithmic complexity of finding out how funnel-like a given DAG is. To this end, we identify the NP-hard problem of computing the arc-deletion distance of a given DAG to a funnel. We develop efficient exact and approximation algorithms for the problem and test them on synthetic random graphs and real-world graphs.
BibTeX
@article{millani2018efficient,
  author = {Marcelo Garlet Millani and Hendrik Molter and Rolf Niedermeier and Manuel Sorge},
  title = {{Efficient algorithms for measuring the funnel-likeness of DAGs}},
  journal = {J. Comb. Optim.},
  year = {2018},
  url = {https://openreview.net/forum?id=kIilceAyT6},
}
Figure