TITLE: Orthogonal Hamiltonian cycles in (n x n x n) grids
QUESTION [8 upvotes]: Let $C_n$ be a cubical $n \times n \times n$ subset of the integer lattice,
so consisting of $n^3$ vertices.
I am interested in special Hamiltonian cycles in $C_n$, special in the
sense that (a) each edge of the cycle has unit length, and
(b) no two adjacent edges are collinear---the path turns $90^\circ$ at every vertex.
Call these orthogonal Hamiltonian cycles.
For $C_2$, this is straightforward:

        
I believe that $C_3$ has no orthogonal Hamiltonian cycle. However, I don't have
a clean proof, just an unconvincing exhaustive case analysis.

Q1. Prove (or disprove) that $C_3$ has no orthogonal Hamiltonian cycle.

For $C_4$, the below shows an orthogonal Hamiltonian cycle
(colored on the right to reveal its structure).
This is known as a Moore curve,
a space-filling curve.


The next level Moore curve, however, has collinear edges,
as do Hilbert curves.

Q2. For which $n$ does $C_n$ have an orthogonal Hamiltonian cycle?

It is natural to hope that $8$ copies of the $C_4$ solution could
be stitched $(2 \times 2 \times 2)$-together to form an ortho-Ham cycle for $C_8$, but I couldn't see my way through the complications.

REPLY [8 votes]: In the recent book "Bicycle or Unicycle?" by Velleman and Wagon, this is problem #16 "Wiggle Room." (Actually, there it's generalized to computing the maximum length path, with a Hamiltonian path in the next-best case, and the best case being a Hamiltonian cycle.) It's known that there is a Hamiltonian cycle for all even $n$, and a nice parity argument that there isn't even a path for $n=3$, and evidence for conjecture that there is a path (but not necessarily a cycle) for all $n\geq 4$.