AI 中文总结
本文研究带重排的树最小宽度绘制问题(MWD),证明其为NP完全问题,提出混合整数线性规划与快速启发式算法,实验显示重排可显著降低绘制宽度,启发式算法效果良好。
AI 中文摘要
树结构在诸多应用中均有出现,绘制美观的树布局是信息可视化领域的经典问题。在诸多实际场景中,顶点需以给定宽高的矩形形式呈现,而非简单的点。当每个顶点的子节点顺序已确定时,存在多项式时间算法可生成符合各类绘制规范的布局。然而,在许多应用场景中,子节点顺序不具备语义意义,合理选择该顺序可大幅降低绘制的宽度。本文研究带重排的最小宽度树绘制问题(Min-Width Tree Drawing with Reordering,简称MWD):给定一棵顶点具有指定宽度的有根树,为每个内部顶点确定子节点的兄弟顺序,以最小化分层绘制的宽度。研究表明,即使是顶点宽度为单位宽度的二叉树,该问题也是NP完全问题。本文提出了一个混合整数线性规划(MILP),可在中等规模实例上精确求解MWD,还提出了一种启发式算法,该算法运行快速且实际效果良好。在合成数据集和真实世界数据集上,将两种方法与基线方法对比评估,结果显示重排可使绘制宽度的中位数降低约20%,单个实例上最多可降低约55%;启发式算法生成布局耗时不足1秒,当MILP能证明最优性时,四分之三实例的启发式结果宽度与最优值的差距在25%以内。
英文摘要
Trees arise in many applications and computing nice tree layouts is a classical problem in information visualization. In many practical settings, vertices need to be represented as rectangles with a given width and height rather than as points. When an order over the children of each vertex is given, polynomial-time algorithms are known that produce drawings adhering to various drawing conventions. However, in many applications, the order of children carries no semantic meaning, and choosing it well can significantly reduce the drawing's width. In this paper, we study the problem \textsc{Min-Width Tree Drawing with Reordering} (\textsc{MWD}): given a rooted tree whose vertices have prescribed widths, find a sibling order at each internal vertex that minimizes the width of the resulting layered drawing. We show that the problem is \textsf{NP}-complete, even on binary trees with unit-width vertices. We present a mixed integer linear program that solves \textsc{MWD} exactly on moderately sized instances, and a heuristic that is fast and delivers good results in practice. We evaluate both approaches against a baseline on synthetic and real-world datasets, where reordering reduces drawing width by a median of $\approx20\%$ and by up to $\approx55\%$ on individual instances. The heuristic computes its layouts in under a second and, when the MILP proves optimality, it stays within $25\%$ of the optimal width in three-quarters of all instances.
CommentsAccepted at the 34th International Symposium on Graph Drawing and Network Visualization (GD 2026)