On the Complexity of the Balanced Vertex Ordering Problem

Jan Kára, Jan Kratochvíl, David R. WoodDiscret. Math. Theor. Comput. Sci 2007

This paper, published in Discrete Mathematics and Theoretical Computer Science in 2007, provides a definitive look at the computational complexity of the Balanced Vertex Ordering Problem. The authors—Jan Kára, Jan Kratochvíl, and David R. Wood—successfully close a significant gap in the field, moving from theoretical curiosity to a precise understanding of when this problem becomes computationally intractable.

The Balanced Vertex Ordering Problem

In graph drawing and network visualization, the way you order vertices in a sequence (a linear layout) is a fundamental design choice. A "balanced" ordering is one where, for every vertex $v$, the number of its neighbors to its left is roughly equal to the number of its neighbors to its right.

This isn't just an aesthetic preference; many graph drawing algorithms use balanced orderings as a foundational step to minimize edge crossings or create symmetrical layouts. Prior to this paper, researchers knew the problem was easy for graphs where every vertex has at most three neighbors (degree $\le 3$) but hard for those with six or more.

A graph (left) and its corresponding linear layout (right), illustrating the concept of vertex ordering.

Complexity Thresholds: The Degree 4 Gap

The authors investigate the "complexity gap" between degrees 3 and 6 to find exactly where the problem becomes hard. Their most significant finding is that the transition from "easy" to "hard" happens exactly at degree four. While degree 3 graphs can be solved efficiently, adding just one more neighbor per vertex makes the problem NP-complete.

Furthermore, the authors demonstrate that planarity—a property that often makes hard problems easier—does not simplify this task. The problem remains NP-complete even for planar graphs with a maximum degree of four.

Methodology and Gadget Construction

To prove NP-hardness, the authors primarily use computational complexity analysis through polynomial-time reductions. They translate known hard problems in logic, specifically variants of the Boolean Satisfiability Problem (SAT), into graph ordering problems.

Key to this approach is the design of intricate "gadgets"—small subgraphs with specific properties that force any balanced ordering of the overall graph to correspond to a valid truth assignment in a logical formula. These include "variable gadgets" to represent logical variables and "crossing gadgets" to maintain planarity in the reduction.

Gadgets used in the polynomial-time reduction to prove NP-completeness for graphs with maximum degree four.

Algorithmic Insights

Despite the hardness results, the paper provides several positive algorithmic outcomes for specific graph classes:

  • The "Even Degree" Exception: If a graph consists entirely of vertices with even degrees, the problem becomes much simpler. The authors show that for these graphs, a "perfect" ordering can be found in $O(n^2(n+m))$ time.
  • Small Imbalance Parameters: If the goal is to find an ordering with only a very small, fixed number of "imbalanced" vertices ($k$), the authors provide an algorithm with a complexity of $O(n^k \cdot (m+n))$. While this is polynomial for a fixed $k$, it becomes practically unusable as $k$ grows.

Future Directions

The primary limitation of the current work is the efficiency of the algorithm for $k$ imbalanced vertices. The authors suggest that future research should focus on Fixed-Parameter Tractable (FPT) algorithms. An FPT algorithm would confine the complexity "explosion" to the parameter $k$ rather than the number of vertices $n$ (e.g., $f(k) \cdot poly(n)$). This would make the balanced ordering approach significantly more viable for real-world graph drawing applications where the number of vertices is large but the desired imbalance is small.

Summary updated

BibTeX
@article{kara2007complexity,
  author = {Jan Kára and Jan Kratochvíl and David R. Wood},
  title = {{On the Complexity of the Balanced Vertex Ordering Problem}},
  journal = {Discret. Math. Theor. Comput. Sci.},
  year = {2007},
  doi = {10.46298/dmtcs.383},
}
Figure