Search arXivSearch

arXiv · 2506.23790

A Graph Width Perspective on Partially Ordered Hamiltonian Paths and Cycles I: Treewidth, Pathwidth, and Grid Graphs

Abstract

We consider the problem of finding a Hamiltonian path or a Hamiltonian cycle with precedence constraints in the form of a partial order on the vertex set. We show that the path problem is $\mathsf{NP}$-complete for graphs of pathwidth 4 while the cycle problem is $\mathsf{NP}$-complete on graphs of pathwidth 5. We complement these results by giving polynomial-time algorithms for graphs of pathwidth 3 and treewidth 2 for Hamiltonian paths as well as pathwidth 4 and treewidth 3 for Hamiltonian cycles. Furthermore, we study the complexity of the path and cycle problems on rectangular grid graphs of bounded height. For these, we show that the path and cycle problems are $\mathsf{NP}$-complete when the height of the grid is greater or equal to 7 and 9, respectively. In the variant where we look for minimum edge-weighted Hamiltonian paths and cycles, the problems are $\mathsf{NP}$-hard for heights 5 and 6, respectively.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Jesse Beisegel, Katharina Klost, Kristin Knorr, Fabienne Ratajczak, Robert Scheffler. 2025-06-30. A Graph Width Perspective on Partially Ordered Hamiltonian Paths and Cycles I: Treewidth, Pathwidth, and Grid Graphs. https://arxiv.org/abs/2506.23790

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Flip Dynamics for Sampling Colorings: Improving $(11/6-ε)$ Using a Simple Metric

We present improved bounds for randomly sampling $k$-colorings of graphs with maximum degree $Δ$; our results hold without any further structural assumptions on the graph. The Glauber dynamics is a simple single-site update Markov chain. Jerrum (1995) proved an optimal $O(n\log{n})$ mixing-time bound for Glauber dynamics whenever $k>2Δ$ where $Δ$ is the maximum degree of the input graph. This bound was improved by Vigoda (1999) to $k>(11/6)Δ$ using a "flip" dynamics which recolors (small) maximal two-colored components in each step. Vigoda's result was the best known for general graphs for 20 years until Chen et al. (2019) established optimal mixing of the flip dynamics for $k>(11/6-\varepsilon)Δ$ where $\varepsilon\approx 10^{-5}$. We present the first substantial improvement over these results. We prove an optimal mixing-time bound of $O(n\log{n})$ for the flip dynamics when $Δ\geq125$ and $k\geq1.809Δ$. This yields, through recent spectral independence results, an optimal $O(n\log{n})$ mixing time for the Glauber dynamics for every fixed $Δ\geq125$ in the same range of $k/Δ$. Our proof utilizes path coupling with a simple weighted Hamming distance for "unblocked" neighbors.

cs.DM

Factorisability of Low Dimensional Non-Negative Integer Matrices

We consider the problem of determining if a given two-dimensional nonnegative integer matrix $M$ is the product of two such matrices, excluding trivial units. A matrix $M$ with no such factorisation is called prime and therefore belongs to the minimal (infinite rank) generator of $2 \times 2$ matrices over the natural numbers, otherwise it is called composite. We also consider the problem of finding a (non-unique) factorisation of a composite matrix. Our results have applications in computational group theory and the theory of codes, where such matrices are called incidence matrices. We analyse the complexity of primality and finding a factorisation for a composite matrix, providing a first efficient algorithm.

cs.DM