Hamiltonian s–t paths in solid grid graphs are decided in polynomial time: an algorithm with a Lean 4 proof

Get email updates

Z. Zzyzek

A polynomial-time algorithm decides whether two designated vertices of a finite two-dimensional solid grid graph can be joined by a Hamiltonian path. The formal development gives correctness and an O((∣V∣+3)6)O((|V|+3)^{6}) bound in its stated step model.

What was already known

Hamilton paths in unrestricted grid graphs are NP-complete. The prior solid-grid results and Sheffield height-function method address Hamiltonian cycles.

AI involvement AI-autonomous

The author reports Claude did nearly all the mathematical work after the author supplied the problem and guidance.

Importance Notable

Extends polynomial solvability from solid-grid cycles to paths with prescribed endpoints.

Technical verification Formal (Lean)

Lean checks correctness under the repository’s explicit solidity predicate and the stated polynomial step bound. The author reports checking the cost model against the algorithm by inspection and cross-checking the solidity predicate on finite grids. The checked bound counts finite-set primitives and does not certify a Turing-machine runtime.

Formal checking

Lean checks correctness under the repository’s explicit solidity predicate and the stated polynomial step bound. The author reports checking the cost model against the algorithm by inspection and cross-checking the solidity predicate on finite grids. The checked bound counts finite-set primitives and does not certify a Turing-machine runtime.

Checker
Author-side Lean and Comparator workflow
Scope
Correctness of decideHamPath and the accompanying step bound in the repository’s cost model
Basis
Reported by the linked checker

Human understanding Few

The reviewed sources do not document a human explanation of the assessed contribution.

Correction and publication history