We study the following combinatorial problem. Given a set of $n$ y-monotone \emph{wires}, a \emph{tangle} determines the order of the wires on a number of horizontal \emph{layers} such that the orders of the wires on any two consecutive layers differ only in swaps of neighboring wires. Given a multiset~$L$ of \emph{swaps} (that is, unordered pairs of wires) and an initial order of the wires, a tangle \emph{realizes}~$L$ if each pair of wires changes its order exactly as many times as specified by~$L$. \textsc{List-Feasibility} is the problem of finding a tangle that realizes a given list~$L$ if such a tangle exists. \textsc{Tangle-Height Minimization} is the problem of finding a tangle that realizes a given list and additionally uses the minimum number of layers. \textsc{List-Feasibility} (and therefore \textsc{Tangle-Height Minimization}) is NP-hard [Yamanaka, Horiyama, Uno, Wasa; CCCG 2018]. We prove that \textsc{List-Feasibility} remains NP-hard if every pair of wires swaps only a constant number of times. On the positive side, we present an algorithm for \textsc{Tangle-Height Minimization} that computes an optimal tangle for $n$ wires and a given list~$L$ of swaps in $O((2|L|/n^2+1)^{n^2/2} \cdot \varphi^n \cdot n)$ time, where $\varphi \approx 1.618$ is the golden ratio and $|L|$ is the total number of swaps in~$L$. From this algorithm, we derive a simpler and faster version to solve \textsc{List-Feasibility}. We also use the algorithm to show that \textsc{List-Feasibility} is in NP and fixed-parameter tractable with respect to the number of wires. For \emph{simple} lists, where every swap occurs at most once, we show how to solve \textsc{Tangle-Height Minimization} in $O(n!\varphi^n)$ time.
翻译:我们研究以下组合问题。给定一组$n$条$y$-单调的\emph{导线},一个\emph{缠绕}决定了这些导线在若干水平\emph{层}上的顺序,使得任意两个连续层上的顺序仅通过相邻导线的交换而不同。给定一个\emph{交换}的多重集~$L$(即无序导线对)以及导线的初始顺序,如果每对导线交换顺序的次数恰好与~$L$指定的次数相同,则缠绕\emph{实现}了~$L$。\textsc{列表可行性}问题是寻找一个实现给定列表~$L$的缠绕(如果存在)。\textsc{缠绕高度最小化}问题是寻找一个实现给定列表且使用最少层数的缠绕。\textsc{列表可行性}(因此\textsc{缠绕高度最小化})是NP难的[Yamanaka, Horiyama, Uno, Wasa; CCCG 2018]。我们证明,即使每对导线仅交换常数次,\textsc{列表可行性}仍然是NP难的。在正面结果方面,我们提出了一种\textsc{缠绕高度最小化}算法,该算法在$O((2|L|/n^2+1)^{n^2/2} \cdot \varphi^n \cdot n)$时间内为$n$条导线和给定的交换列表~$L$计算最优缠绕,其中$\varphi \approx 1.618$是黄金分割比,$|L|$是~$L$中的总交换次数。由此算法,我们推导出一个更简单、更快的版本来解决\textsc{列表可行性}。我们还利用该算法证明\textsc{列表可行性}属于NP,并且关于导线数量是固定参数可解的。对于\emph{简单}列表(其中每个交换最多发生一次),我们展示了如何在$O(n!\varphi^n)$时间内解决\textsc{缠绕高度最小化}。