A linear arrangement is a mapping $\pi$ from the $n$ vertices of a graph $G$ to $n$ distinct consecutive integers. Linear arrangements can be represented by drawing the vertices along a horizontal line and drawing the edges as semicircles above said line. In this setting, the length of an edge is defined as the absolute value of the difference between the positions of its two vertices in the arrangement, and the cost of an arrangement as the sum of all edge lengths. Here we study two variants of the Maximum Linear Arrangement problem (MaxLA), which consists of finding an arrangement that maximizes the cost. In the planar variant for free trees, vertices have to be arranged in such a way that there are no edge crossings. In the projective variant for rooted trees, arrangements have to be planar and the root of the tree cannot be covered by any edge. In this paper we present algorithms that are linear in time and space to solve planar and projective MaxLA for trees. We also prove several properties of maximum projective and planar arrangements, and show that caterpillar trees maximize planar MaxLA over all trees of a fixed size thereby generalizing a previous extremal result on trees.
翻译:线性排列是将图$G$的$n$个顶点映射到$n$个连续不同整数的映射$\pi$。通过将顶点沿水平直线排列,并将边表示为该直线上方的半圆弧,可以直观地表示线性排列。在此设置中,边的长度定义为排列中其两个顶点位置差的绝对值,排列的成本定义为所有边长之和。本文研究最大线性排列问题(MaxLA)的两种变体,该问题旨在找到最大化成本的排列。在无根树的平面变体中,顶点必须按避免边交叉的方式排列;在有根树的投影变体中,排列需满足平面性,且树根不能被任何边覆盖。本文提出了时间和空间复杂度均为线性的算法,用于求解树的平面与投影MaxLA问题。此外,我们证明了最大投影排列与最大平面排列的若干性质,并表明毛虫树在所有固定规模的树中能最大化平面MaxLA,从而推广了先前的树极值结果。