Table of Contents
Fetching ...

Another Hamiltonian Cycle in Bipartite Pfaffian Graphs

Andreas Björklund, Petteri Kaski, Jesper Nederlof

TL;DR

The paper advances the understanding of the Another Hamiltonian Cycle problem by proving that bipartite Pfaffian graphs with minimum degree at least three admit both linear-time and logarithmic-space algorithms to find a second Hamiltonian cycle that includes a given anchor edge when a Hamiltonian cycle is provided. It introduces a novel witness framework based on anchored Hamiltonian cycles and good colorings, enabling linear-time construction of a Pfaffian orientation and efficient cycle-switching via auxiliary graphs and alternating cycles. In the cubic case, Thomason's lollipop method is shown to terminate in linear time, signaling a concrete efficiency gain for this classical approach in a nontrivial graph class. The framework extends to faster TSP and Hamiltonian-cycle counting in bipartite Pfaffian/planar graphs using width-based dynamic programming, yielding competitive planar-case bounds, and yields structural corollaries such as lower bounds on the number of Hamiltonian cycles per edge. Altogether, the work identifies a meaningful graph class where the Another Hamiltonian Cycle problem becomes tractable and connects deep graph-structural insights with practical algorithms for TSP and cycle counting.

Abstract

Finding a Hamiltonian cycle in a given graph is computationally challenging, and in general remains so even when one is further given one Hamiltonian cycle in the graph and asked to find another. In fact, no significantly faster algorithms are known for finding another Hamiltonian cycle than for finding a first one even in the setting where another Hamiltonian cycle is structurally guaranteed to exist, such as for odd-degree graphs. We identify a graph class -- the bipartite Pfaffian graphs of minimum degree three -- where it is NP-complete to decide whether a given graph in the class is Hamiltonian, but when presented with a Hamiltonian cycle as part of the input, another Hamiltonian cycle can be found efficiently. We prove that Thomason's lollipop method~[Ann.~Discrete Math.,~1978], a well-known algorithm for finding another Hamiltonian cycle, runs in a linear number of steps in cubic bipartite Pfaffian graphs. This was conjectured for cubic bipartite planar graphs by Haddadan [MSc~thesis,~Waterloo,~2015]; in contrast, examples are known of both cubic bipartite graphs and cubic planar graphs where the lollipop method takes exponential time. Beyond the lollipop method, we address a slightly more general graph class and present two algorithms, one running in linear-time and one operating in logarithmic space, that take as input (i) a bipartite Pfaffian graph $G$ of minimum degree three, (ii) a Hamiltonian cycle $H$ in $G$, and (iii) an edge $e$ in $H$, and output at least three other Hamiltonian cycles through the edge $e$ in $G$. We also present further improved algorithms for finding optimal traveling salesperson tours and counting Hamiltonian cycles in bipartite planar graphs with running times that are not known to hold in general planar graphs.

Another Hamiltonian Cycle in Bipartite Pfaffian Graphs

TL;DR

The paper advances the understanding of the Another Hamiltonian Cycle problem by proving that bipartite Pfaffian graphs with minimum degree at least three admit both linear-time and logarithmic-space algorithms to find a second Hamiltonian cycle that includes a given anchor edge when a Hamiltonian cycle is provided. It introduces a novel witness framework based on anchored Hamiltonian cycles and good colorings, enabling linear-time construction of a Pfaffian orientation and efficient cycle-switching via auxiliary graphs and alternating cycles. In the cubic case, Thomason's lollipop method is shown to terminate in linear time, signaling a concrete efficiency gain for this classical approach in a nontrivial graph class. The framework extends to faster TSP and Hamiltonian-cycle counting in bipartite Pfaffian/planar graphs using width-based dynamic programming, yielding competitive planar-case bounds, and yields structural corollaries such as lower bounds on the number of Hamiltonian cycles per edge. Altogether, the work identifies a meaningful graph class where the Another Hamiltonian Cycle problem becomes tractable and connects deep graph-structural insights with practical algorithms for TSP and cycle counting.

Abstract

Finding a Hamiltonian cycle in a given graph is computationally challenging, and in general remains so even when one is further given one Hamiltonian cycle in the graph and asked to find another. In fact, no significantly faster algorithms are known for finding another Hamiltonian cycle than for finding a first one even in the setting where another Hamiltonian cycle is structurally guaranteed to exist, such as for odd-degree graphs. We identify a graph class -- the bipartite Pfaffian graphs of minimum degree three -- where it is NP-complete to decide whether a given graph in the class is Hamiltonian, but when presented with a Hamiltonian cycle as part of the input, another Hamiltonian cycle can be found efficiently. We prove that Thomason's lollipop method~[Ann.~Discrete Math.,~1978], a well-known algorithm for finding another Hamiltonian cycle, runs in a linear number of steps in cubic bipartite Pfaffian graphs. This was conjectured for cubic bipartite planar graphs by Haddadan [MSc~thesis,~Waterloo,~2015]; in contrast, examples are known of both cubic bipartite graphs and cubic planar graphs where the lollipop method takes exponential time. Beyond the lollipop method, we address a slightly more general graph class and present two algorithms, one running in linear-time and one operating in logarithmic space, that take as input (i) a bipartite Pfaffian graph of minimum degree three, (ii) a Hamiltonian cycle in , and (iii) an edge in , and output at least three other Hamiltonian cycles through the edge in . We also present further improved algorithms for finding optimal traveling salesperson tours and counting Hamiltonian cycles in bipartite planar graphs with running times that are not known to hold in general planar graphs.
Paper Structure (25 sections, 28 theorems, 35 equations, 8 figures, 1 table)

This paper contains 25 sections, 28 theorems, 35 equations, 8 figures, 1 table.

Key Result

Theorem 1

There exists a deterministic linear-time algorithm that, given as input (i) a bipartite Pfaffian graph $G$ with minimum degree three, (ii) a Hamiltonian cycle $H$ in $G$, and (iii) an edge $e\in E(H)$, outputs a Hamiltonian cycle $H'\neq H$ in $G$ with $e\in E(H')$.

Figures (8)

  • Figure 1: Illustration of orientations induced by good colorings. Left: an undirected bipartite planar graph $G$ drawn in one of its orientations $\vec{G}_e$ with $e=\{s,t\}$, one arc reversal away from a Pfaffian orientation $\vec{G}$. Middle and right: two vertex colorings $\chi_H$ and coloring-induced orientations $\vec{G}_e^{\chi_H}$ for two different Hamiltonian cycles $H$, with the arcs of $\vec{H}$ drawn in bold in each case. Observe that every monochromatic arc reverses its orientation with respect to $\vec{G}_e$, whereas bichromatic arcs keep their orientation. Observe also that the removal of the arc $(t,s)$ from $\vec{G}_e^{\chi_H}$ leaves an acyclic Hamiltonian directed graph, whereby the directed Hamiltonian path and hence $H$ can be found, for example, by topological sorting; cf. Lemma \ref{['lem:acyclic-hamiltonicity']}.
  • Figure 2: Illustration of a perfect matching in the graph $F_\lambda$. Left: The graph $G$ drawn in one of its orientations $\vec{G}_e$ with $e=\{s,t\}$ and the bipartition $(L,R)$ with vertices in $L$ drawn as white circles and the vertices in $R$ drawn as black boxes. Right: The graph $F_\lambda$ and the coloring $\lambda$ drawn as an oriented overlay of $G$. Observe that each vertex $r\in R$ has two copies $[r,\rho]$ in $F_\lambda$, one for each parity $\rho\in\{0,1\}$, with a blue square indicating parity $0$ and an orange square indicating parity $1$. Although each vertex $\ell\in L$ has two copies $[\ell,p]$ in $F_\lambda$, one copy for each port $p\in\{0,1\}$, we contract these two copies into one vertex (circle) in the drawing, and display for each vertex its color $\lambda(\ell)\in\{0,1\}$ (blue or orange) instead. Each arc in the drawing is oriented from $L$ to $R$ and represents two edges of $F_\lambda$ with opposite ports. A perfect matching $M$ in $F_\lambda$ is represented by the bold arcs. In particular, observe that each circle is incident to two bold arcs; these two bold arcs represent two edges in $M$ with opposite ports. These opposite ports are otherwise arbitrary except for the edge of $M$ that projects to $\{s,t\}$, which must have port $0$. Also observe that from the drawn $M$ it is visually intuitive how to obtain a Hamiltonian cycle in $G$ corresponding to $M$ by turning the bold arcs into the edges of a Hamiltonian cycle in $G$; this intuition is made rigorous in Lemma \ref{['lem:matching-to-extension']} by the Hamiltonian cycle $\mathrm{H}[{M}]$ of $G$ obtained from $M$.
  • Figure 3: Obtaining another Hamiltonian cycle using a directed cycle in $D_{\lambda,H}$. Left: Two perfect matchings $M_H$ in $F_\lambda$ drawn as oriented overlays of $G$ (cf. Figure \ref{['fig:f-lambda']}), with further overlaying drawn in green and constituting the arcs of $D_{\lambda,H}$. Right: The corresponding two orientations $\vec{G}_e^{\chi_H}$ and colorings $\chi_H$. Top and bottom: In both cases we have that $D_{\lambda,H}$ contains a unique $s$-avoiding directed cycle $\vec{Q}$. Using $\vec{Q}$ in each case we can switch between the top and bottom Hamiltonian cycles in $G$. Note in particular that the two vertex colorings agree in $L$ but differ in $R$.
  • Figure 4: An example of the sequence of steps of Thomason's lollipop method in an $n$-vertex cubic bipartite planar graph viewed as a sequence of arc reversals in the directed graph $D_{\lambda,H}$. The given input $G$ and $H$ together with $e=\{s,t\}$ is displayed in the top left; the black arcs are oriented as in $\vec{G}_e$ obtained from Lemma \ref{['lem:pfaffian-orientation-from-hamiltonian-cycle']} on input $H$. We display the initial Hamiltonian cycle $H$ (top left) and the final Hamiltonian cycle $H'$ (bottom right) obtained by the method, as well as the intermediate $e$-anchored Hamiltonian paths $Q_0,Q_1,\ldots,Q_9$ obtained in consecutive lollipop steps; the end-vertex of each $Q_i$ is highlighted with red. The green arcs in $Q_0$ are the arcs of $D_{\lambda,H}$. Observe that each lollipop step from $Q_i$ to $Q_{i+1}$ can be understood as reversing the light-green arc in $Q_i$; the method terminates when the end-vertices of $Q_0$ and $Q_{i+1}$ agree. By the structure of $D_{\lambda,H}$, we must have $i\leq n$; cf. Theorem \ref{['thm:tho']}.
  • Figure 5: The avoid-one gadget. Left: The gadget itself. Thick edges must be used by a Hamiltonian cycle. This is accomplished by replacing each thick edge with a path on three edges and two additional degree-two vertices. The key property of the gadget is that in any Hamiltonian cycle in our final construction, exactly one of the $k$ choice edges $c_1,c_2,\ldots, c_k$ is not part of the cycle. Middle: Any Hamiltonian cycle enters and exits only at the terminals $a$ and $b$ avoiding exactly one of the choices, here $c_2$. It will follow from the rest of the construction that the Hamiltonian cycle could not enter and exit also via a choice edge, since that part would then form a cycle of its own. Right: A schematic version of the gadget used in subsequent figures.
  • ...and 3 more figures

Theorems & Definitions (37)

  • Theorem 1: Main; Linear--time Another Hamiltonian Cycle in minimum degree three
  • Theorem 2: Main; Logarithmic--space Another Hamiltonian Cycle in minimum degree three
  • Theorem 3: Thomason's lollipop method in cubic bipartite Pfaffian graphs
  • Corollary 3: Non-uniqueness in minimum degree three
  • Corollary 3: Cubic tight lower bound
  • Theorem 4: Bipartite Pfaffian TSP parameterized by path width
  • Theorem 5: Bipartite Pfaffian TSP parameterized by branch width
  • Corollary 5: Bipartite planar TSP
  • Theorem 6: Bipartite Pfaffian counting Hamiltonian cycles parameterized by path width
  • Theorem 7: Bipartite Pfaffian counting Hamiltonian cycles parameterized by branch width
  • ...and 27 more