We study upward planar straight-line drawings that use only a constant number of slopes. In particular, we are interested in whether a given directed graph with maximum in- and outdegree at most $k$ admits such a drawing with $k$ slopes. We show that this is in general NP-hard to decide for outerplanar graphs ($k = 3$) and planar graphs ($k \ge 3$). On the positive side, for cactus graphs deciding and constructing a drawing can be done in polynomial time. Furthermore, we can determine the minimum number of slopes required for a given tree in linear time and compute the corresponding drawing efficiently.
翻译:我们研究只使用固定坡度数的向上平面直线图。 特别是,我们感兴趣的是,一个以最大在度和体外最大在度以美元计的指定方向图是否接受以美元斜度计的图画。 我们显示,一般来说,这是NP很难决定外部平面图(k = 3美元)和平面图(k = 3美元)的图画。 在正面,决定和构造图画的仙人掌图画可以在多数值时间内完成。 此外,我们可以确定某一棵树在线性时间所需的最低斜度,并有效地计算相应的绘图。