Upward and Orthogonal Planarity are W[1]-Hard Parameterized by Treewidth

Bart M. P. Jansen, Liana Khazaliya, Philipp Kindermann, Giuseppe Liotta, Fabrizio Montecchiani, Kirill Simonov

Abstract

Upward planarity testing and Rectilinear planarity testing are central problems in graph drawing. It is known that they are both NP-complete, but XP when parameterized by treewidth. In this paper we show that these two problems are W[1]-hard parameterized by treewidth, which answers open problems posed in two earlier papers. The key step in our proof is an analysis of the All-or-Nothing Flow problem, a generalization of which was used as an intermediate step in the NP-completeness proof for both planarity testing problems. We prove that the flow problem is W[1]-hard parameterized by treewidth on planar graphs, and that the existing chain of reductions to the planarity testing problems can be adapted without blowing up the treewidth. Our reductions also show that the known $n^{O(tw)}$-time algorithms cannot be improved to run in time $n^{o(tw)}$ unless ETH fails.

Introduction

Graph drawing focuses on creating readable visualizations of complex networks. Two fundamental constraints in this field are planarity (avoiding edge crossings) and specific geometric orientations. This research addresses the parameterized complexity of two classic problems: Upward Planarity Testing and Rectilinear (or Orthogonal) Planarity Testing. While both are NP-complete in general, their complexity relative to structural parameters like treewidth remained an open question until this work.

Problem Definitions

The paper investigates two specific types of planar embeddings:

  • Upward Planarity: Determines if a directed acyclic graph (DAG) can be drawn in the plane such that all edges point in a consistent direction (e.g., upwards) without any crossings.
  • Rectilinear Planarity: Determines if an undirected graph can be drawn using only horizontal and vertical segments for edges, maintaining planarity.
Examples of graph drawings: (a) a directed graph, (b) its upward planar drawing, and (c) its rectilinear drawing.

Complexity and Treewidth

A common approach to solving NP-hard graph problems is to exploit the treewidth ($tw$) of the input graph. Treewidth measures how closely a graph resembles a tree structure. Many problems that are hard in general become tractable (FPT) when treewidth is small, meaning they can be solved in $f(tw) \cdot n^{O(1)}$ time.

Previous work established that Upward and Rectilinear Planarity are in XP with respect to treewidth, solvable in $n^{O(tw)}$ time. This paper settles the question of whether an FPT algorithm exists by proving that both problems are W[1]-hard parameterized by treewidth. This implies that the $n^{O(tw)}$ dependency is likely unavoidable, and no algorithm of the form $f(tw) \cdot n^{O(1)}$ exists unless $FPT = W[1]$.

The Hardness Proof: All-or-Nothing Flow

The core of the proof is a reduction from the Multicolored Clique problem, which is known to be W[1]-hard. The authors introduce an intermediate problem: All-or-Nothing Flow (AoNF). In this variant of network flow, each edge must either carry its full capacity or zero flow.

The primary technical contribution is showing that AoNF remains W[1]-hard even on planar graphs with low treewidth. The authors designed a grid-like gadget where flow choices correspond to vertex selections in the original Clique problem.

The reduction from Multicolored Clique to an All-or-Nothing Flow instance. The structure ensures that flow choices across different gadgets remain consistent, representing a valid clique selection.

To maintain planarity without increasing treewidth, the authors exploited the "all-or-nothing" property. When two paths cross, if they have distinct capacities, they can be routed through a single vertex without the risk of flow "leaking" between paths, as any combined flow would violate the capacity constraints of the outgoing edges. This allows for a simple way to eliminate edge crossings in a flow network, which is usually the most difficult part of proving hardness for planar graph problems.

Key Results and Implications

By carefully reducing planar AoNF to the planarity testing problems using "tendril" gadgets—complex subgraphs that force specific geometric constraints—the authors proved:

  1. Upward Planarity Testing is W[1]-hard parameterized by treewidth.
  2. Rectilinear Planarity Testing is W[1]-hard parameterized by treewidth.
  3. Under the Exponential Time Hypothesis (ETH), these problems require $n^{\Omega(tw)}$ time, confirming that existing algorithms are nearly optimal.

These results extend to other parameters like cutwidth and pathwidth, providing a comprehensive lower bound for the complexity of these graph drawing problems.

Conclusion

This work closes a significant gap in the parameterized complexity of graph drawing. By proving W[1]-hardness, it demonstrates that even for structurally simple graphs, upward and rectilinear planarity testing remain computationally intensive. Future work may explore even more restrictive parameters or investigate the potential XNLP-completeness of these problems, which would provide an even stronger statement of hardness.

Summary updated

BibTeX
@inproceedings{jansen2023upward,
  author = {Bart M. P. Jansen and Liana Khazaliya and Philipp Kindermann and Giuseppe Liotta and Fabrizio Montecchiani and Kirill Simonov},
  title = {{Upward and Orthogonal Planarity are W[1]-Hard Parameterized by Treewidth}},
  booktitle = {GD},
  year = {2023},
  doi = {10.1007/978-3-031-49275-4\_14},
}
Figure