# Longest cycle on a cube

What is the length of the longest straight path on the surface of a unit cube, such that it starts and ends at the same point?

The path can cross itself and must be straight on every edge and face that it passes.

• By "straight on every edge" do you mean that if the cube were unfolded so the two adjoining faces are coplanar, then the line would be straight? Dec 26, 2023 at 10:08
• Surely there are such paths of arbitrarily high length?
– xnor
Dec 26, 2023 at 10:47
• If you allow intersections, then you can wind around 4 faces arbitrarily many times like a spool of sewing thread before it hits one of the two other faces and cuts across to the first winding. Dec 26, 2023 at 12:37
• @WeatherVane Trivial solution, two edges and two diagonals is $2+2\sqrt 2$
– z100
Dec 26, 2023 at 18:32

I believe the maximum length is

Infinite.

Because

You can start from the center of an edge, cross an adjacent edge, then go 4N+1 times over the opposite edge and arrange to end on the middle of the edge adjacent to the last edge you crossed.
This resuls in winding the line N 1/2 times around 4 faces of the cube, starting and ending in the middle of opposite edges. Continuing straight you wind again N times around the cube over a different set of 4 edges and end up where you started.
This forms a perfectly straight loop.
Since N is arbitrary you can make it as long as you want.

PS: I did not read the comment before posing. Other got the same idea.

Now with the restriction that the line should not intersect:

Apply the method with N=0. The total length is $$2 \sqrt{5} = 4.4721$$

If vertices are allowed, I would draw a zig-zag over 4 diagonals around the cube for a length of $$4 \sqrt{2} = 5.6568$$

It can be unfolded to yield a straight line:

• The last diagram for four supposed diagonals is a bit off. The line isn't really straight. You can't go four diagonals, but you can go two diagonals and two edges, as commented by @z100 Dec 26, 2023 at 22:26
• As you said, it's a "zig-zag". That diagram can only be made by cutting a face diagonally. Dec 26, 2023 at 22:46
• @WeatherVane I don't understand the objection. These are true diagonals that go from vertex to vertex. They are obviously perfectly aligned. Do you complain about the image quality? And I don't see why cutting a face diagonally to unfold should be a problem. Dec 27, 2023 at 0:03
• @FlorianF I think it's about the definition of "straightness", which is pretty clear when passing the edge, but no so clear when passing the vertex, depended on the way of flattening the cube net.
– z100
Dec 27, 2023 at 9:57
• I would completely disallow going along an edge or through a vertex as it leads to too much ambiguity about straight lines. For example you could argue that two edges meeting at a vertex are in a straight line because you can unfold the cube so that they are. That leads to the possible answer of a length 8 loop, a Hamilton path visiting all vertices. If you disallow vertices you could still go infinitessimally close to them and have the same effect, but it would reject the diagonals solution here because the loop would have to slalom between the four vertices and that is not straight. Dec 27, 2023 at 10:24