English

Computing Hamiltonian Paths with Partial Order Restrictions

Discrete Mathematics 2025-02-28 v3 Computational Complexity Data Structures and Algorithms Combinatorics

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 NP\mathsf{NP}-complete even if restricted to complete bipartite graphs and posets of height 2. In contrast, for posets of width kk there is a known O(k2nk)\mathcal{O}(k^2 n^k) algorithm for arbitrary graphs with nn 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)no(k)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 O(n2)\mathcal{O}(n^2) algorithm for arbitrary posets.

Keywords

Cite

@article{arxiv.2404.16662,
  title  = {Computing Hamiltonian Paths with Partial Order Restrictions},
  author = {Jesse Beisegel and Fabienne Ratajczak and Robert Scheffler},
  journal= {arXiv preprint arXiv:2404.16662},
  year   = {2025}
}
R2 v1 2026-06-28T16:06:26.732Z