When solving the Hamiltonian path problem it seems natural to be given additional precedence constraints for the order in which the vertices are visited. For example one could decide whether a Hamiltonian path exists for a fixed starting point, or that some vertices are visited before another vertex. We consider the problem of finding a Hamiltonian path that observes all precedence constraints given in a partial order on the vertex set. We show that this problem is $\mathsf{NP}$-complete even if restricted to complete bipartite graphs and posets of height 2. In contrast, for posets of width $k$ there is an $\mathcal{O}(k^2 n^k)$ algorithm for arbitrary graphs with $n$ vertices. We show that it is unlikely that the running time of this algorithm can be improved significantly, i.e., there is no $f(k) n^{o(k)}$ time algorithm under the assumption of the Exponential Time Hypothesis. Furthermore, for the class of outerplanar graphs, we give an $\mathcal{O}(n^2)$ algorithm for arbitrary posets.
翻译:在求解哈密顿路径问题时,自然地会额外考虑顶点访问顺序的优先约束。例如,可以判断是否存在固定起点的哈密顿路径,或要求某些顶点先于其他顶点被访问。本文研究在顶点集上的偏序关系中满足所有优先约束的哈密顿路径问题。我们证明:即使限制在完全二分图且偏序高度为2的情形下,该问题仍为$\mathsf{NP}$-完全。相比之下,对于宽度为$k$的偏序,存在一个适用于任意$n$顶点图的$\mathcal{O}(k^2 n^k)$算法。我们证明该算法的运行时间难以显著改进——即假设指数时间假说成立,不存在$f(k) n^{o(k)}$时间算法。此外,对于外平面图类,我们给出了任意偏序下的$\mathcal{O}(n^2)$算法。