Optimal Orthogonal Drawings in Linear Time
Walter Didimo, Giuseppe Liotta, Giacomo Ortali, Maurizio Patrignani
TL;DR
This work resolves a long-standing open problem by giving an $O(n)$-time algorithm to compute bend-minimum planar orthogonal drawings of $n$-vertex planar 3-graphs in the variable embedding setting, while ensuring at most one bend per edge (except $K_4$). The approach hinges on three pillars: (i) a finite set of representative shapes for SPQR-tree components, (ii) a linear-time edge-labeling scheme via the Bend-Counter data structure, and (iii) a linear-time drawing procedure that re-roots SPQR-and-BC trees to assemble blocks into a global optimal representation. The paper also develops linear-time techniques for fixed- and reference-embedding analyses of triconnected cubic graphs with flexible edges, providing fundamental tools for bend-minimization in broader graph drawing contexts. Overall, the results deliver both a theoretically optimal and practically efficient method for bend minimization in a central class of planar graphs, with potential extensions to related orthogonal drawing variants.
Abstract
A planar orthogonal drawing Γ of a connected planar graph G is a geometric representation of G such that the vertices are drawn as distinct points of the plane, the edges are drawn as chains of horizontal and vertical segments, and no two edges intersect except at common end-points. A bend of Γ is a point of an edge where a horizontal and a vertical segment meet. Drawing Γ is bend-minimum if it has the minimum number of bends over all possible planar orthogonal drawings of G. Its curve complexity is the maximum number of bends per edge. In this paper we present a linear-time algorithm for the computation of planar orthogonal drawings of 3-graphs (i.e., graphs with vertex-degree at most three), that minimizes both the total number of bends and the curve complexity. The algorithm works in the so-called variable embedding setting, that is, it can choose among the exponentially many planar embeddings of the input graph. While the time complexity of minimizing the total number of bends of a planar orthogonal drawing of a 3-graph in the variable embedding settings is a long standing, widely studied, open question, the existence of an orthogonal drawing that is optimal both in the total number of bends and in the curve complexity was previously unknown. Our result combines several graph decomposition techniques, novel data-structures, and efficient approaches to re-rooting decomposition trees.
