Optimal decimal display made of dice

17 views
Skip to first unread message

Selimov Yunus

unread,
Jun 23, 2026, 12:10:59 PM (21 hours ago) Jun 23
to SeqFan
Hello!

I have a DIY calendar made from three custom dice sitting on my table. One die shows the twelve months (two per face, one is always upside down), and the other two are standard six-sided dice for the day. Day dice are {0, 1, 2, 3, 4, 5} and {0, 1, 2, 6, 7, 8}. The trick is that a 6 can also be read as a 9 when turned upside down.

That got me wondering: more generally, if I build a calendar with m custom dice, what is the theoretical limit?

I first tried brute-force searching for the best dice sets. For m = 2, the search found 21 without the 6=9 trick, and 32 with the trick. For m = 3, it found 76 and 87.

After stepping back from the code, I found the upper bound.
We have m dice, each with 6 faces. The only choices are:

- whether leading zeros are allowed,
- whether 6=9 is allowed.

Let S be the number of faces available for the target symbols, and let D be the number of distinct symbols.

Define

x = S // D
y = S % D


The largest number N such that every date from 0 to N or from 1 to N is displayable is obtained by distributing the symbols as evenly as possible :

- the first y symbols appear x + 1 times,
- the remaining D - y symbols appear x times.

So, N is the number formed by writing the digit y + 1 exactly x times, then appending the digit y.
If x = 0, the result is just the single digit y.

Case 1: leading zeros required, no 6=9 trick
0 must appear on every die, so we reserve m faces for zeros.

S = 5m
D = 9

x = (5m) // 9
y = (5m) % 9


The extra copies go to digits 1 through y.

Example for m = 2: 21

Case 2: leading zeros required, with 6=9 trick
0 must appear on every die.

S = 5m
D = 8  (
digits 1–8, with 6 and 9 merged)

x = (5m) // 8
y = (5m) % 8

The extra copies go to digits 1 through y.

Example for m = 2: 32

Case 3: no leading zeros, no 6=9 trick
All ten digits 0–9 are distributed evenly.

S = 6m
D = 10

x = (6m) // 10
y = (6m) % 10


The extra copies go to digits 1 through y, while digit 0 and digits y + 1 through 9 get x copies.

Example for m = 2: 32

Case 4: no leading zeros, with 6=9 trick
All nine symbols 0–8 are distributed evenly.

S = 6m
D = 9  (
digits 0–8, with 6 and 9 merged)

x = (6m) // 9
y = (6m) % 9

The extra copies go to digits 1 through y, while digit 0 and digits y + 1 through 8 get x copies.

Example for m = 2: 43

First terms:

Leading zeros, no 6=9:
5, 21, 76, 332, 887, 4443, 9998, 55554, 111110, 666665, 2222221, 7777776, 33333332, 88888887, 444444443, 999999998, 5555555554, 11111111110, 66666666665, 222222222221, ...

Leading zeros, with 6=9:
5, 32, 87, 554, 2221, 7776, 44443, 111110, 666665, 3333332, 8888887, 55555554, 222222221, 777777776, 4444444443, 11111111110, 66666666665, 333333333332, 888888888887, 5555555555554, ...

No leading zeros, no 6=9:
6, 32, 98, 554, 1110, 7776, 33332, 99998, 555554, 1111110, 7777776, 33333332, 99999998, 555555554, 1111111110, 7777777776, 33333333332, 99999999998, 555555555554, 1111111111110, ...

No leading zeros, with 6=9:
6, 43, 110, 776, 4443, 11110, 77776, 444443, 1111110, 7777776, 44444443, 111111110, 777777776, 4444444443, 11111111110, 77777777776, 444444444443, 1111111111110, 7777777777776, 44444444444443, ...

The m = 1 is a little special, and I am not yet sure whether the answer is 5 or 6.

In an optimal solution, every symbol appears either x or x + 1 times. Since the total number of occupied faces is S, the average load per die is S / m, which is at most 6. Each symbol appears at most m times, so its copies can be assigned to distinct dice, and since the total number of occupied faces is at most 6m, the per-die capacity is never exceeded. The symbols always fit on the m six-faced dice, so that upper bound is always achievable.

That is about it.

All the best, Yunus Selimov.

Sean A. Irvine

unread,
Jun 23, 2026, 4:14:12 PM (17 hours ago) Jun 23
to seq...@googlegroups.com
From memory, Ross Eckler's book "Making the Alphabet Dance" has a section on selecting dice (labeled with letters) such that the maximum number of words can be formed. At one point I wrote some code for trying to find such sets with n dice, k sides, etc. against the Scrabble dictionary. I don't remember much about it, but I think it was quite hard to do in general.

Sean.

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/183bd696-6c52-4811-a1b3-d5b2f0d13e98n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages