Posts Tagged ‘dice’

Monomatch Dice

July 12th, 2021

A game called “Spot It!” has received a lot of attention from recreational mathematicians in recent years. There’s a good video by Matt Parker, and a blog post about it by one of my five readers. (Hi MJD!) The game contains a number of cards each with eight symbols, and the object is to be the first to spot the matching symbol between the pair of cards. The designers of the game, in finding an elegant set of cards where every pair has exactly one match, used a structure that can be understood in terms of finite projective geometry. Parker calls these monomatch sets of symbol sets.

This led me to consider monomatching on symbols on the faces of a pair of dice. (I guess I’m on a roll with the dice content here. Sorry, there’s really only one decent dice related pun; if you try to stretch beyond that, things get dicey.) The obvious thing to do with a pair of d6’s is to have a set of 36 symbols. You could consider the symbols as being arranged in a 6×6 grid. The faces on one die would each contain all of the symbols on one row, and the faces on the other die would each contain the symbols on one column. For an added trick, the numbers 1 through 6 could be six of the symbols, and if they are on a diagonal of that grid, the dice could be used as regular dice by ignoring the non-numerical symbols.

This seems like an idea worth exploring, once my laser engraver arrives. There is a version of Spot It! with 30 cards and 6 symbols per card that is marketed to be played by young children, so it seems like it would be somewhere near the realm of playability. (Adding dice beyond the first two might help.) And although Spot It! already comes in a compact tin, there’s not much that’s more portable than a pair of dice. But there’s not really any kind of interesting puzzle to be found in it, so I was hoping to find something else to do with symbol matching on dice.

And I did come up with another idea, and it is good, and it is dumb. Imagine, if you will, that you could use a pair of dice as… 2d6!

Here, unlike with Spot It!, it’s desirable to make spotting the match be easy, so I’ve put the numbers in order and used colors as an aid.

But not, of course, 2d6 as we know it. Instead of adding numbers on the two dice, we’d have the numbers 2 through 12 as symbols for matching. The frequencies in which the numbers occur on the two dice would have to be such that the probability of getting a number as a match would be the same as the probability of getting that number as a sum using a regular pair of d6’s.

2d6 rollFrequencyFaces per die
211, 1
321, 2
431, 3
542, 2 or 1, 4
651, 5
762, 3 or 1, 6
851, 5
942, 2 or 1, 4
1031, 3
1121, 2
1211, 1

Now, finding a set of number sets for the symbols on the faces of each die becomes an interesting puzzle, especially if we add constraints to make our dice more nice. One type of constraint we might care about is on the quantity of numbers on each die. Minimizing the total quantity on both of the dice would be good, as would be balancing the quantities on the dice.

Unfortunately, we cannot do both. The minimum total quantity is 43, which is odd. So in order to balance the quantities, we need to use the inefficient alternative for either 5 or 9. (Using the inefficient alternative for 7 doesn’t change the parity of the total, so I’ve dismissed that option.)

We could try to go further in our pursuit of balance. The solution I found above has balanced number quantities on the two dice, but at the level of faces, there are issues. The first set has face quantities of {2, 3, 3, 4, 5, 5}, while the second has {2, 3, 4, 4, 4, 5}. Having the same face quantities between the two dice would be desirable, especially if it could be done while minimizing the number of faces with five numbers, since those faces look more cluttered.

You could also drill down to the numbers themselves. The sum of all of the numbers on the upper die above is 158, while the sum on the lower die is 148. Ideally, we’d make those sums equal, or at least closer.

Problem #50: Find a “nicer” numbering for a pair of monomatch 2d6 dice than the one I found. One potential flaw that I haven’t mentioned already is having a pair of faces on the same die with identical number sets. When I was manually looking for numberings, they seem to want to have pairs like this, so they are harder to avoid than you might think.

Shaker Dice and Edge Labelings

June 21st, 2021

Last year I saw an interesting Kickstarter campaign for “shaker dice”. The product was shaped like a credit card, with a number of reservoirs with tiny balls. Instead of tossing, you would shake the device and then read off random numbers based on where a specially colored ball ended up in a channel below the reservoir. When the campaign failed to fund, I felt pretty motivated to produce my own version, for a couple of reasons. First, it used lasercut plastic. This is a medium I’ve used for a bunch of puzzles, so I felt that the design work would be pretty straightforward for me. Second, they just got the implementation all wrong.

This was the top image on the campaign page for that Kickstarter. The first clue that they didn’t understand their market is they thought folks would not want more dice.

To see why I thought that, let’s take a step back, and consider what the function of dice actually is. It seems obvious, at first glance, it’s just to produce a random number. But I’d argue there’s more to it than that. Games are social; what you really want is to communicate a random result to other people around a table. This is why you can expect to get a bit of side-eye if you bring a D-Total to a D&D night.

It’s eighteen dice in one! Want to know what number I just rolled? It’s really simple, just read the included manual.

The biggest problem with No More Dice is that because it produces a large number of different results at the same time, it doesn’t communicate which one is the one you care about. So the first change in my design was to split each die into a separate item. I also wanted to increase the size of the balls and the numbers at the positions where the balls end up, in order to make the dice readable from farther away. There was an important practical limitation; the thickest available plastic sheet for the middle layer was 4.9mm thick, so I was looking at 4mm balls. That’s not really enough to make numbers that are readable from across a table, but at least you can see the positions of the balls reasonably well.

At this point, it became clear that the size of the dice was going to be an issue. Even a d4 would be bigger than most regular dice; a d6 would be huge, and d10 or above would be entirely impractical, once we consider that you’d be carrying each of the standard RPG dice together as a set. Getting to a full set of dice that gamers might consider reasonable was going to take a bit of creativity.

My first observation was that I could abandon the biggest selling point of No More Dice: that you didn’t have to toss them. Early on, I decided that I wanted there to be a bit of padding on the back of the dice so you could set them down on a table and let gravity hold the balls in place at the bottom of the channel. But if there was padding on the front side as well, and the dice had numbers on both sides, and you could toss them… my d4 could also be a d8. Uh oh. Multiple functions? Was I heading down the dark path to the D-Total? It’s a fair worry, but, most importantly, the result requires no interpretation. It’s still just the number above the specially colored ball. Second, the physical gesture used communicates which die was rolled. If I shook it and set it down, it was a d4. If I shook it and tossed it, (so it could land on either side with equal probability) it was a d8.

That idea was enough to get me most of the way to a full set. The same principle could give me a d6/d12, and a d10 with 5 balls. (The d10 could also be a d5, but since that isn’t a standard die, it seemed better to balance the numbers by putting the odds and evens on opposite sides.) Two problems remained. The d6/d12 was bigger than I wanted it to be, and there was just no reasonable way to get a d20.

There was a good reason to hope that solutions existed. Having only one ball be distinguishable from the others leaves a lot of potential information unused. In principle, with 5 balls of different colors, there are 5! permutations, or enough for a d120. Just one that requires a manual to decode a numerical result from the permutation. If only there was a genuinely good die-roll decoding technique. Something where a single symbol would be enough to tell you how to find your result, no manual required. Something that gamers already do all the time with the results of dice rolls. Something like basic arithmetic.

In fact, the answer was a mathematical structure that I already knew about, in another context. A perfect Golomb ruler is a way of marking a line with n marks such that each of the integers between 1 and n choose 2 is one of the distances between two marks. One perfect Golomb ruler with 4 marks is {0, 1, 4, 6}.

Another model for the same structure is a “graceful labeling” of the edges of a complete graph. We label the nodes with integers, and the edge labeling is induced by taking the absolute difference of the nodes on that edge. By using two specially colored balls whose positions correspond to nodes on the graph, the edges give us our die-roll results. Slap a minus sign on the die, and what you need to do is clear enough.

That allows us to have a d6 that is the same size as the d4, but now we’ve lost the d12 that occupied the same die. Can we get it back? Not with a graceful labeling, unfortunately, but if we use addition rather than subtraction on the other side of the die, we can get all of the numbers between 7 and 12 using {3, 4, 5, 7} as our set of numbers on the other side.

We could, in fact, have used addition on both sides of the die, as the sums from {0, 1, 2, 4} also give us 1 through 6. Complete edge labelings induced by addition have been studied by mathematicians as well: they’re called “harmonious labelings”. (The usual definition uses addition modulo the number of edges. I didn’t think gamers were likely to put up with mod though, so I’m not using it.) While I could have gone with the design with addition on both sides, I ended up preferring the one with a plus side and a minus side, mostly because it echoes what I used for the d20.

Right, the d20. Taking 5 choose 2 gives us 10 for the number of possibilities given two specially colored balls out of five. It would be really great if we could pull off the same trick that we used for the d6/d12, by getting 1 through 10 on one side of the die and 11 through 20 on the other side. Alas, no combination of addition and subtraction on the two sides of the die will allow this. However, if we remove the requirement to have it also be a d10 we can get all of the numbers for a d20 with addition on one side and subtraction on the other. I wrote Python code using Google’s or-tools constraint solver to find valid numberings; the one I went with is {0, 1, 5, 18, 20} on the minus side and {1, 2, 5, 7, 9} on the plus side.

And that’s the entire set of standard RPG dice! It worked out pretty nicely that the whole set could be done with just two different sizes of the same design, each with a one dark ball version, and a two dark ball version with extra arithmetic.

As a coda, I did put some thought into what could be done with 6-ball shaker dice. One dark ball gives us my original d6/d12 design. Two dark balls gives us 6 choose 2 = 15, from which we could make a d15 or d30 if any solutions existed. But they do not. Three dark balls — well that would be ridiculous. 6 choose 3 is 20, so you could get an alternative d20 that didn’t require tossing, or a d40 that does. But what would you even do for labeling such a die? I settled on adding the two outside numbers, and subtracting the middle one. A d20 wasn’t possible, but a d40 was:

It’s utterly chonky, and makes you do an entirely unreasonable amount of arithmetic, all in order to give you a die that absolutely nobody needs — and I kind of love it.

This is How I Roll: Non-transitive Pips

April 29th, 2021

A set of three non-transitive dice has the property that if you roll two of them and compare numbers, the first tends to beat the second, the second beats the third, and the third beats the first. I recommend this article by James Grime, which describes how these dice work and covers some more recent variations on the theme.

Red beats blue and blue beats green, both on 7/12 of rolls. Green beats red on 25/36 rolls.

I recently acquired some Sicherman dice with indented pips, which inspired me to use acrylic paints to color the faces so that matched colors on a die roll indicate doubles, in the manner described in this post. Since I had a method for altering dice, I wondered if there was anything interesting I could do with standard pipped dice.

Non-transitive dice inspired an idea: what if we could color the pips with three different colors so that, with a single roll of one die, the results are non-transitive over the pip counts of the three colors? Some experimentation showed that it is in fact possible:

Unlike the usual non-transitive dice, ties occur on these. For a roll of 1, a tie between the two missing colors is inevitable, and for a roll of 2, either one color is used, and the other two tie, or two colors are used, and those two tie. It’s possible to have those be the only ties, but I prefer the symmetry of having each pair of colors give the same results, so I want one more tie. Here, white beats red, red beats blue, and blue beats white, all with a 3-2 record, with one tie.

The “standard” non-transitive dice shown at the top have the interesting property that if you roll them twice, the results become non-transitive in the opposite direction. I found that there are no individual non-transitive pip dice that have this property, but there are pairs of dice that work. For example, you could add this die to the one above:

This die works the same way as the previous one as an individual die. (White beats red, red beats blue, and blue beats white.) But when you roll both dice together, white beats blue, blue beats red, and red beats white.

Problem #49: There are sets of 4 and more non-transitive dice, where each beats the next in a cycle. Can there be a non-transitive pip die with four colors, or even five? Since the total number of pips is 21, the number of pips of each color would have to be unbalanced (or the remainder pip could use a neutral color.)

This is how I roll: Sicherman dice with doubles

June 12th, 2015

Here are a few mostly functionally equivalent things:

2d6x3

The first is a pair of perfectly normal dice. The second is a “Merged d6”, a 36-sided die I bought through a crowdfunding campaign. Each of the sides is labeled with a sum of the results of rolling two normal dice. One of each of the even numbers between two and twelve is colored green. These let you simulate rolling doubles, as is required for games like Monopoly: each roll of two of the same number is represented. (The small print size of the numbers and the fact that it takes a moment to figure out which number is on top make this somewhat less practical than the normal dice, but I collect dice for mathematical interest rather than practicality.)

The blue and green dice are Sicherman dice. They are numbered a bit oddly. One of them has faces numbered 1, 2, 2, 3, 3, 4. The other’s faces are numbered 1, 3, 4, 5, 6, 8. The distribution of sums of die rolls is nevertheless the same as that of a normal pair of dice. In fact, it is the only non-standard numbering for a pair of dice with this property where the numbers are all positive integers.

Unfortunately, Sicherman dice don’t work for games that distinguish doubles rolls. Could we design a version of the Sicherman dice that does work for such games? The specially colored faces of the Merged d6 suggested a direction to take. We might color the faces of the Sicherman dice differently, and call a roll a doubles roll if the colors match. How many different ways are there to color the faces so as to produce exactly one match for every even number between two and twelve?

I posed this question on Google+. Joe DeVincentis found that there are sixteen essentially different solutions, of which two are the most interesting to me for designs that I might be interested in having made at some point:

1 2 2 3 3 41 3 4 5 6 8

This has the advantage of only requiring three colors, and all of the faces that never match are on the same die. It also has an easy mnemonic that you could use even without coloring the faces: one on low die, odd on high die; four on low die, even on high die. Variations where some subset of the never-matching faces are a different color from the others are considered essentially similar here.

1 2 2 3 3 41 3 4 5 6 8

Here the colors can be ordered from low to high, and have the same order on each die.

The rest of the solutions follow. For clarity, I’ve colored all of the numbers that never match black even when they exist on both dice. We may define a rule that black is not considered to match itself.

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

1 2 2 3 3 41 3 4 5 6 8

This is how I roll: Magic dice, part 2

April 11th, 2015

One formulation of a magic cube simply numbers the vertices of a cube from one to eight, and requires that, for each face, the set of vertices that frame it have the same sum. There are three distinct magic cubes of this type:

magic-vertex-cubes-all
Now, first of all, in applying this to a design of dice, it seems that the ideal application would be octahedral dice, since the octahedron is the dual of the cube, and thus the numbers could simply be printed on different faces. The sets of faces with magic sums would then be the ones surrounding a vertex of the octahedron. But I don’t have an order for custom d8’s, I have one for custom d6’s. Given that, what is the best way to represent one of these figures on a cube? As before, we can use a bold font to highlight the number that is used as the result of a roll. This time, since we can’t print directly on the vertices, the numbers will be repeated on each face that borders a vertex.

I have two answers. The first places the numbers on their traditional faces (with opposite faces summing to seven.) Only the middle numbering above can be used in this manner.

magic-vertex-cube-1

The second is suggested by the figure on the right. Since the numbers we aren’t using (that is, 7 and 8) appear at opposite vertices, we can highlight a diagonal ring around the cube and catch all of the numbers from 1 to 6. This is nicely symmetrical, but it does not put the numbers in their traditional positions.

magic-vertex-cube-2

This is how I roll: Magic dice, part 1

March 29th, 2015

A while back I supported a Kickstarter campaign for custom laser-engraved dice. I figured there had to be lots of mathy designs out there waiting to be found, and being able to make physical copies of them would inspire me to find some of them. And I have.

magic-die-2

One of the first ideas i had was to use magic cubes. I didn’t know what sorts of magic cubes had been discovered, but I knew it was an obvious enough variation on the idea of magic squares that something had to be out there. In general, most magic cubes aren’t good for printing on dice, because they contain numbers in the interior of the cube, and one typically is only able to engrave the exterior. I did however find a couple of promising variations on the page on Unusual Magic Cubes at the late Harvey Heinz’s magic-squares.net site.

That page shows a cube found by Mirko Dobnik where each face is divided into a 2×2 grid. The faces sum to 50, and the rings around the cube sum to 100. In order to turn Dobnik’s cube into a usable six-sided die, I would need to find a solution that placed the numbers 1 to 6 on different faces of the cube, ideally on the same faces that they would occupy on a standard die. Then I could set these numbers in boldface to show that they represent the result of a die roll for a given side.

I decided this was a good time to learn how to use a constraint solver. I picked Numberjack because it uses Python, which is the language I am most comfortable with, and there was a magic square example that I could tweak. With face sum and ring sum constraints, and constraints to put the numbers 1 to 6 on the proper faces, (plus symmetry breaking constraints) I was getting at least hundreds of thousands of solutions. So I added constraints to make the four diagonals that traverse all six faces to sum to 75, and I fixed the positions of the numbers 1-6. The most symmetrical ways to pick corners of the faces of a die are to take all of the ones on one diagonal ring, or to take the corners that meet at antipodal vertices of the die. The first would violate the diagonal sum constraint, and the second bunched the relevant numbers up more than I liked, so I picked an arrangement that still has rotational symmetry about one of the axes through antipodal vertices, but that doesn’t have reflection symmetry. Then there are four ways to pick the axis of symmetry. At first I chose one at random, and came up with just eight solutions, one of which had odds and evens in a checkered pattern. Then I tried again with the axis going through the [1,2,3] and [4,5,6] vertices, and there were two parity-checkered solutions out of six, one of which is shown above.

I know it’s a bit strange to disappear from blogging for nearly a year, and then promise a multipart post that is itself part of a series, but yes, that is just what I’m doing. There are more magic dice to come, and then more mathematically inspired dice that are less magic. Hopefully there will also be some posts that are not about dice, not too far off.

Wanderings on a Six-Sided Die

August 27th, 2010

Here’s a little doodle on a grid based on a standard six-sided die:

I started by deciding that the pip positions should all connect North to south and East to West. It followed logically that I could have a puzzle where the solver could choose one of two possibilities for each empty cell: connecting North to West and South to East, or North to East and South to West. Because there are 33 non-pip squares, there would therefore be 233=8,589,934,592 ways to fill the grid. The lines on the outside of the grid show how the squares would connect when folded into a cube.

As an exercise, I found a way to make a single circuit, which is shown above. While that turned out to be about the difficulty of puzzle I can handle in something I am solving by hand, I’m sure there are more interesting specimens to be found.

Unfortunately, because the number of pips is odd, it’s impossible to have two circuits where each go through all of the pips. The circuits would have to cross each other an even number of times. But we could have one of the circuits cross itself once, and then have both circuits go through the remaining 20 pips. (Let’s call that problem number, oh what are we on, #12. By the way, the problem numbers are so that I can keep track of solvers of numbered problems and give them the fame they deserve. Nobody has solved any yet. You can be the first!)

Another possibility would be to use three circuits, each crossing itself once, and each visiting 12 pips in addition to the self-crossing. That’s #13.

I like big, wide ranging circuits here, so a constraint I like is to have circuits that visit all 6 sides. So bonus points on the preceding problem for having all three circuits do that. And that suggests #14: Maximize the number of circuits in a solution where all circuits present visit all 6 sides.

I thought early on that I could take this in the direction of a knot theoretical puzzle, but then one would have to keep track of which thread went under which in the crossings, which seemed like an unnecessary complication. I also think it would be interesting to make a multi-state maze (See Robert Abbott’s site for some good examples) using this template, but I haven’t yet had any good ideas for how that would work. If you have a good idea for a variation on this puzzle, I’d love to hear it. (This is of course true for all of my puzzles.)

For your solving convenience, I have an empty grid image here, and the Inkscape SVG file I used to produce it and the image above is here.