# A perpetual calendar cubes spinoff problem

Perpetual calendar cubes keep track of the date all year around. They must be turned (or even transposed) once a day. The following is a spinoff problem I'm having trouble with. Any hints are much appreciated.

Label the sides of four cubes (rather than two as in the link above) with the digits $0,1,2,\cdots,9$ according to will. Just like the calendar cubes, turn them so that different integers are created. Determine the longest sequence of consecutive integers that can be created with 1, 2, 3 or 4 cubes (over all possible such labelings).

If there are several sequences of the same maximum length, find the "largest sequence" (i.e., a sequence in which the last term is $>$ any other last term in a longest sequence.).

I have nothing to show at this point. I can't even determine if my sequence of 33 integers using two cubes is a max length sequence!

Edit: Assume the digits are distinct so that $6$'s and $9$'s cannot be swapped.

-

## 1 Answer

Presumably your span is $0$ through $32$, putting $0,1,2,3,4,5$ on one cube and $1,2,6,7,8,9$ on the other (or something similar). You can prove that maximal because any span of $33$ numbers includes $3$ multiples of $11$, which would require $3$ numbers be on both cubes except for the accident of $0$ being representable by a single digit. You would then need $13$ places. This assumes one cannot invert a $6$ to get a $9$ (often permitted in this puzzle).

For the four cube version, I would follow along in the same spirit. Put each digit on two faces plus an extra $1,2,3,4$. You would hope to get $0$ through $554$ that way, but need to make sure there is no blockage-that there is in fact an arrangement that works. The same logic says you can't do better than $554$ without using numbers of less than $3$ digits.

-
"Presumably your span is 0 through 32" Yes--I was trying to determine if that had to be the case, i.e. a span starting at $0$. –  sasha Dec 5 '11 at 17:35
No, my point is that $0$ is the only multiple of $11$ that doesn't require two of the same digits. Therefore you don't need a $0$ on both cubes. This solution would fail if we had to represent $0$ as $00$. In that case, the best you could do would be a span from $11n+1$ through $11n+32$ and by your secondary ranking would be $67$ through $98$ –  Ross Millikan Dec 5 '11 at 17:40
In your example, $30$ is unobtainable. I used $\{0,1,2,4,5,7\}$ and $\{1,2,3,6,8,9\}$ –  sasha Dec 5 '11 at 17:59
@sasha: You are right. That is the sort of blockage I was referring to in my comment about the $4$ cube case-one has to show that there is a way to avoid it. In this case there is. –  Ross Millikan Dec 5 '11 at 19:44
"You would hope to get $0$ through $544$ that way". I think you meant $554$. –  sasha Dec 5 '11 at 20:40