Semantic word clouds visualize the semantic relatedness between the words of a text by placing pairs of related words close to each other. Formally, the problem of drawing semantic word clouds corresponds to drawing a rectangle contact representation of a graph whose vertices correlate to the words to be displayed and whose edges indicate that two words are semantically related. The goal is to maximize the number of realized contacts while avoiding any false adjacencies. We consider a variant of this problem that restricts input graphs to be layered and all rectangles to be of equal height, called \textsc{Maximum Layered Contact Representation Of Word Networks} or \textsc{Max-LayeredCrown}, as well as the variant \textsc{Max-IntLayeredCrown}, which restricts the problem to only rectangles of integer width and the placement of those rectangles to integer coordinates. We classify the corresponding decision problem $k$-\textsc{IntLayeredCrown} as NP-complete even for triangulated graphs and $k$-\textsc{LayeredCrown} as NP-complete for planar graphs. We introduce three algorithms: a 1/2-approximation for \textsc{Max-LayeredCrown} of triangulated graphs, and a PTAS and an XP algorithm for \textsc{Max-IntLayeredCrown} with rectangle width polynomial in $n$.
翻译:语义词云通过将语义相关的词对彼此靠近放置,来可视化文本中词语间的语义关联性。形式化而言,绘制语义词云的问题对应于绘制一个图的矩形接触表示,其中图的顶点对应于待显示的词语,图的边表示两个词语语义相关。目标是在避免任何错误邻接的同时,最大化已实现的接触数量。我们考虑该问题的一个变体,其限制输入图为分层图且所有矩形高度相等,称为 \textsc{Maximum Layered Contact Representation Of Word Networks} 或 \textsc{Max-LayeredCrown},以及变体 \textsc{Max-IntLayeredCrown},后者进一步限制矩形宽度为整数且矩形必须放置在整数坐标上。我们将对应的判定问题 $k$-\textsc{IntLayeredCrown} 归类为 NP 完全问题,即使对于三角剖分图亦然;并将 $k$-\textsc{LayeredCrown} 归类为平面图的 NP 完全问题。我们提出了三种算法:一种用于三角剖分图 \textsc{Max-LayeredCrown} 的 1/2 近似算法,以及一种 PTAS 和一种 XP 算法用于处理矩形宽度为 $n$ 的多项式的 \textsc{Max-IntLayeredCrown} 问题。