# Rolling cube on an infinite chessboard

Imagine a six-sided die, D6, the right size to exactly occupy a square on a chessboard.

The die can move to any adjacent square, but does so by rolling rather than sliding, so the topmost side of the die will show a different value.

Now suppose the chessboard is infinite in every direction: north, south, east & west. And there is a constraint: the die must at no point show a 6 on top. 1, 2, 3, 4 & 5 are all ok.

Subject to this constraint, can you define a sequence of moves for the rolling die across the infinite chessboard, so that each square of the board is occupied exactly once?

EDIT: have added my own suggested solution below.

EDIT 2: have awarded the legendary green tick to what I consider to be the best-explained answer. A clear picture that didn’t confuse people is a big part of this. I excluded my own (very different) answer from contention, although I do like it! Thanks all!

Here is I believe a simple way of demonstrating that

it is possible.

First note that it is easy to make a straight 3 squares wide line (let's call it a street): For example, moving N start with the 6 facing W. Move WWNEENWWNEE.. The six will face WdEEdWWdEEdW.. between these moves (d for "down").

At some point we will need to turn 90°: Picking up where we dropped the previous example at the E edge of the street this can be achieved: NNNWWSESWW . The 6 will be WWWWdEEdNNN. This turns our N-bound street to the W and does so traversing a clean 3x3 square. Conveniently, we can use the same sequence backwards in time and mirrored in space if we want to achieve the same turn while happening to be on the other edge of the street at the moment we want to turn. Indeed, N-bound on the W edge: NNESENNWWW turns W with the 6 facing EEEdNNdSSSS.

With these building blocks thinking in terms of

3-by-3 blocks

we have transformed the original problem into the same without the six constraint. Indeed, we can move a

3-by-3 square freely forward, left or right.

Without this constraint the problem is trivial, for example, anything

"spirally"

will do.

Picture:

• Any chance of a pic? I promise when I post my own solution, I will show it graphically Mar 5, 2023 at 10:47
• @DanielMathias I can see your point. Though I'd argue the spiral bit is the most obvious part of the construction. I've edited the answer to reflect this. (Also, the spirals are not the same. Mine has long straights and the occasional left (or right, but always the same) turn, theirs is arguably more convoluted to the point of being non obvious.) Mar 5, 2023 at 15:36
• @Laska Since you are asking so nicely. Mar 5, 2023 at 18:23
• @Laska If you look at the small arrows attached to the small squares you'll find that that is what they do. For example, the bottom right 3x3 is entered at the bottom left corner and left at the top left corner. Mar 6, 2023 at 0:34
• @Laska I thought of that but in order to make sure it expands in all directions you'd have to do something like cycle trough orientations which is kind of spiralling. Mar 6, 2023 at 2:27

If we start with 1 facing up, our single movement option is to tilt, roll some distance with 2, 3, 4, and 5, then tilt in the opposite direction to go back to 1. This lets us think of a path as consisting of U-shaped segments with length-1 legs.

These are sufficient, as evidenced by this jagged spiral consisting of a starting section and a repeating 3×3 block:
The white section is the initial block and red cells indicate places where 1 is up.

• Definitely agree with the characterization as U segments. Finding it harder to see the algorithm for orientation of the 3x3 blocks, and why this must create a spiral. If this is a solution as it seems to be, it’s very different from mine! Mar 4, 2023 at 14:12
• I'm struggling to make sense of the graphic. What do the green/black/grey square denote?
– fljx
Mar 4, 2023 at 16:10
• @fljx This image should make it clear. Mar 4, 2023 at 20:29
• To show the path clearly, each square is represented as 2x2 shape. It would be good if the answer can explain this Mar 4, 2023 at 21:33
• The graphic can definitely be improved—it's very confusing right now. Mar 4, 2023 at 21:50

Is it possible?

Yes.

Why?

The die could roll on three possible "axes": 3146, 2156 and 5432. You can roll on 5432 in one direction, then turn so that 1 and not 6 would be on top without going the same direction twice in a row right after rolling 1, and then these are possible:

The bottom right shape shows that it's possible (the colors on the cells are the 5-4-3-2 blocks starting from the red one). Just extend it indefinitely.

• Edited my answer because there are multiple "net directions" to arrive at the same number on top. Mar 4, 2023 at 15:31
• It’s not entirely obvious to me how this pattern would extend indefinitely. Can you show some more cells please Mar 5, 2023 at 0:09

Here's my own solution:

Just keep spiraling outwards, adding two "meccano pieces" of length 2k (together with the connectors) at each stage.

If one tries the same simple-minded approach with a single spiral, there seems to be a parity issue, leaving at least one square unvisited by the path.

Enjoy!

• could you explain how you make both spirals ? Maybe I misunderstood the solution, but I don't see how you pass from one spiral to the other, and so only half the squares are occupied. Mar 8, 2023 at 11:42
• From the green square showing 1, one can roll north to show 2,3,4 or 5, and that begins one of the spirals. Or one can roll south to begin the other spiral. It's still a single path. The distance between any two specific squares will always be finite Mar 8, 2023 at 12:37
• Your question asks for a sequence of moves, which can only traverse a path in one direction, but your path is unbounded in two directions. Your comment says it best: you can visit all of the yellow squares or all of the white squares. You cannot visit all of both while following the path you propose. Mar 15, 2023 at 20:02
• I asked specifically for a sequence of moves, but I didn’t ask that this start at one point. I wanted to allow the possibility that the sequence be infinite at both ends Mar 16, 2023 at 10:39
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}