Computing Hamiltonian Paths with Partial Order Restrictions
Jesse Beisegel, Fabienne Ratajczak, Robert Scheffler
TL;DR
This work studies the Partially Ordered Hamiltonian Path Problem ($POHPP$), asking whether a graph admits a Hamiltonian path whose vertex order extends a given partial order. It maps the tractability landscape: $POHPP$ remains $NP$-hard even on restricted graphs such as balanced complete bipartite graphs and height-$2$ posets, but becomes tractable when the poset width is bounded only to reveal an $O(k^2 n^k)$ XP algorithm (with ETH-based lower bounds ruling out significant improvements). It also identifies a fixed-parameter tractable approach based on the distance to linear order, and provides a quadratic-time algorithm for $POHPP$ on outerplanar graphs, thereby clarifying which graph- and poset-structure parameters yield efficient solutions. Together, these results delineate the boundaries between intractability and tractability for precedence-constrained Hamiltonian paths and point to fruitful directions for poset-dimension and graph-class research, including directed variants.
Abstract
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 a known $\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.
