Minimum projective linearizations of trees in linear time
Lluís Alemany-Puig, Juan Luis Esteban, Ramon Ferrer-i-Cancho
TL;DR
This work tackles the MLA on trees under planarity and projectivity constraints, formalizing the problem cost as $D=\sum_{\{u,v\}\in E} d(u,v)$ and reviewing prior linear-time results. It corrects an error in Hochberg and Stallmann's planar algorithm and derives two $O(n)$-time algorithms for the projective variant: a direct adaptation of the planar approach with a corrected embed_branch, and a novel interval-based method that aligns with GT's sketch. The authors also illuminate a fundamental link: a planar optimum can be obtained by solving the projective problem on a tree rooted at a centroid, enabling a unified view and a more compact algorithmic framework. These results collectively tighten the complexity bounds for constrained MLA on trees and suggest a path toward unified treatments of planarity and projectivity, with implications for related maximum MLA questions.
Abstract
The Minimum Linear Arrangement problem (MLA) consists of finding a mapping $π$ from vertices of a graph to distinct integers that minimizes $\sum_{\{u,v\}\in E}|π(u) - π(v)|$. In that setting, vertices are often assumed to lie on a horizontal line and edges are drawn as semicircles above said line. For trees, various algorithms are available to solve the problem in polynomial time in $n=|V|$. There exist variants of the MLA in which the arrangements are constrained. Iordanskii, and later Hochberg and Stallmann (HS), put forward $O(n)$-time algorithms that solve the problem when arrangements are constrained to be planar (also known as one-page book embeddings). We also consider linear arrangements of rooted trees that are constrained to be projective (planar embeddings where the root is not covered by any edge). Gildea and Temperley (GT) sketched an algorithm for projective arrangements which they claimed runs in $O(n)$ but did not provide any justification of its cost. In contrast, Park and Levy claimed that GT's algorithm runs in $O(n \log d_{max})$ where $d_{max}$ is the maximum degree but did not provide sufficient detail. Here we correct an error in HS's algorithm for the planar case, show its relationship with the projective case, and derive simple algorithms for the projective and planar cases that run without a doubt in $O(n)$ time.
