Another Hamiltonian Cycle in Bipartite Pfaffian Graphs

Authors Andreas Björklund , Petteri Kaski , Jesper Nederlof

Thumbnail PDF


  • Filesize: 0.77 MB
  • 20 pages

Document Identifiers

Author Details

Andreas Björklund
  • IT University of Copenhagen, Denmark
Petteri Kaski
  • Aalto University, Finland
Jesper Nederlof
  • Utrecht University, The Netherlands


We thank the anonymous reviewers of an earlier version of this paper for their comments, in particular for pointing out [Maximilian Gorsky et al., 2023].

Cite AsGet BibTex

Andreas Björklund, Petteri Kaski, and Jesper Nederlof. Another Hamiltonian Cycle in Bipartite Pfaffian Graphs. In 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 297, pp. 26:1-26:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


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 reach of 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 achieved yet in general planar graphs. Our technique also has purely graph-theoretical consequences; for example, we show that every cubic bipartite Pfaffian graph has either zero or at least six distinct Hamiltonian cycles; the latter case is tight for the cube graph.

Subject Classification

ACM Subject Classification
  • Theory of computation → Graph algorithms analysis
  • Mathematics of computing → Graph theory
  • Another Hamiltonian cycle
  • Pfaffian graph
  • planar graph
  • Thomason’s lollipop method


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Takanori Akiyama, Takao Nishizeki, and Nobuji Saito. NP-completeness of the Hamiltonian cycle problem for bipartite graphs. Journal of Information Processing, 3:73-76, 1980. Google Scholar
  2. Cristina Bazgan, Miklos Santha, and Zsolt Tuza. On the approximation of finding a(nother) Hamiltonian cycle in cubic Hamiltonian graphs. J. Algorithms, 31(1):249-268, 1999. URL:
  3. Andreas Björklund. Determinant sums for undirected Hamiltonicity. SIAM J. Comput., 43(1):280-299, 2014. URL:
  4. Andreas Björklund, Petteri Kaski, and Jesper Nederlof. Another Hamiltonian cycle in bipartite pfaffian graphs, 2024. URL:
  5. J. Bosák. Hamiltonian lines in cubic graphs. In Theory of Graphs, International Symposium, Rome, July 1966, pages 35-46. Gordon & Breach, New York, 1967. Google Scholar
  6. Marcin Briański and Adam Szady. A short note on graphs with long Thomason chains. Discrete Math., 345(1):112624, 2022. URL:
  7. Kevin Buchin, Christian Knauer, Klaus Kriegel, André Schulz, and Raimund Seidel. On the number of cycles in planar graphs. In Guohui Lin, editor, Computing and Combinatorics, 13th Annual International Conference, COCOON 2007, Banff, Canada, July 16-19, 2007, Proceedings, volume 4598 of Lecture Notes in Computer Science, pages 97-107. Springer, 2007. URL:
  8. Kathie Cameron. Thomason’s algorithm for finding a second hamiltonian circuit through a given edge in a cubic graph is exponential on Krawczyk’s graphs. Discrete Math., 235(1):69-77, 2001. Chech and Slovak 3. URL:
  9. G.L. Chia and Siew-Hui Ong. Hamilton cycles in cubic graphs. AKCE Int. J. Graphs Comb., 4(3):251-259, 2007. URL:
  10. Marek Cygan, Jesper Nederlof, Marcin Pilipczuk, Michał Pilipczuk, Johan M. M. Van Rooij, and Jakub Onufry Wojtaszczyk. Solving connectivity problems parameterized by treewidth in single exponential time. ACM Trans. Algorithms, 18(2), 2022. URL:
  11. Marcelo H. de Carvalho, Cláudio L. Lucchesi, and U. S.R. Murty. On the number of dissimilar pfaffian orientations of graphs. RAIRO - Theoretical Informatics and Applications, 39(1):93-113, 2005. URL:
  12. Argyrios Deligkas, George B. Mertzios, Paul G. Spirakis, and Viktor Zamaraev. Exact and approximate algorithms for computing a second Hamiltonian cycle. In Javier Esparza and Daniel Král', editors, 45th International Symposium on Mathematical Foundations of Computer Science, MFCS 2020, August 24-28, 2020, Prague, Czech Republic, volume 170 of LIPIcs, pages 27:1-27:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2020. URL:
  13. Maximilian Gorsky, Raphael Steiner, and Sebastian Wiederrecht. Matching theory and Barnette’s conjecture. Discrete Math., 346(2):113249, 2023. URL:
  14. Haddadan, Arash. Finding a second Hamiltonian cycle in Barnette graphs. Master’s thesis, University of Waterloo, 2015. URL:
  15. Derek A. Holton, Bennet Manvel, and Brendan D. McKay. Hamiltonian cycles in cubic 3-connected bipartite planar graphs. J. Combin. Theory Ser. B, 38:279-297, 1985. URL:
  16. Pieter W. Kasteleyn. Graph theory and crystal physics. In Graph Theory and Theoretical Physics, pages 43-110. Academic Press, London, 1967. Google Scholar
  17. A.K. Kelmans. Constructions of cubic bipartite 3-connected graphs without Hamiltonian cycles. Amer. Math. Soc. Transl. Ser. 2, 158:127-140, 1994. URL:
  18. Shiva Kintali. Finding a second Hamilton circuit, 2009. URL:
  19. Adam Krawczyk. The complexity of finding a second Hamiltonian cycle in cubic graphs. J. Comput. System Sci., 58(3):641-647, 1999. URL:
  20. Charles H. C. Little. An extension of Kasteleyn’s method of enumerating the 1-factors of planar graphs. In Combinatorial Mathematics (Proc. 2nd Australian Conf., Univ. Melbourne, 1973), number 403 in Lecture Notes in Mathematics, pages 63-72. Springer, Berlin, 1974. Google Scholar
  21. Charles H. C. Little. A characterization of convertible (0, 1)-matrices. J. Combinatorial Theory, 18:187-208, 1975. URL:
  22. William McCuaig. Pólya’s permanent problem. Electron. J. Combin., 11(1), 2004. URL:
  23. Serguei Norine. Matching Structure and Pfaffian Orientations of Graphs. PhD thesis, Georgia Institute of Technology, 2005. Google Scholar
  24. Christos H. Papadimitriou. On the complexity of the parity argument and other inefficient proofs of existence. J. Comput. System Sci., 48(3):498-532, 1994. URL:
  25. Neil Robertson, Paul D. Seymour, and Robin Thomas. Permanents, Pfaffian orientations, and even directed circuits. Ann. of Math. (2), 150(3):929-975, 1999. URL:
  26. John Sheehan. The multiplicity of Hamiltonian circuits in a graph. In Recent Advances in Graph Theory (Proc. 2nd Czechoslovak Sympos., Prague, 1974), pages 477-480. Academia, Prague, 1975. Google Scholar
  27. Andrew G. Thomason. Hamiltonian cycles and uniquely edge colourable graphs. Ann. Discrete Math., 3:259-268, 1978. URL:
  28. Carsten Thomassen. On the number of Hamiltonian cycles in bipartite graphs. Combinatorics, Probability and Computing, 5:437-442, 1996. URL:
  29. Carsten Thomassen. Chords of longest cycles in cubic graphs. J. Combin. Theory Ser. B, 71(2):211-214, 1997. URL:
  30. William T. Tutte. On Hamiltonian circuits. J. London Math. Soc., 21:98-101, 1946. URL:
  31. William T. Tutte, editor. Recent Progress in Combinatorics: Proceedings. New York. Academic Press, 1969. Google Scholar
  32. Douglas B. West. Introduction to Graph Theory. Prentice Hall, Upper Saddle River, NJ, 1996. Google Scholar
  33. Liang Zhong. The complexity of Thomason’s algorithm for finding a second Hamiltonian cycle. Bull. Aust. Math. Soc., 98(1):18-26, 2018. URL: