math+art
SubscribeBlogAbout

Dice (Part 1 of 2): Probability and Symmetry

July 05, 2020
Spiraling Dice
Out of Luck.

Beautiful and complex imagery stem from various applications of the humble 6-sided die. At its core, a die can be viewed in the context of many different mathematical fields, and thus it provides an elegant connection between them all. This post kicks off a two part series exploring dice from the perspective of

  1. Probability distributions
  2. The octahedral group
  3. Context free grammars
  4. Computer graphics
  5. Random walks
  6. Fractals

There will be plenty of visualizations and images along the way to motivate the math. This first post will cover (1) and (2), and the second post will finish the remaining topics.

Probability Distributions on Dice

Most of us are familiar with the 6-sided die used in countless games for various ages and across many cultures. We often think of dice as a way to generate a 1-in-6 chance event (roll the die, and it shows either 1, 2, 3, 4, 5 or 6 each with equal probability). But, this is far from the only possibility. As a simple example, you can simulate a coin flip by evaluating whether your roll is even or odd, each occurring with probability 1/2. And in fact, we can use a standard die to produce up to a 1/24 event, by bending the way in which we normally think of using it.

Before we touch upon these new ways of interpreting dice, first let's answer: Why is there a 1/6 chance of rolling any given side on a die? Intuitively, it comes down to symmetry, but let's dig a bit deeper. Consider what a die is meant to represent — a cube with labeled faces. Ignoring the labeling for now, note that all the faces are indistinguishable from one another, as in, they are all identically sized squares.

This is a key observation, but not sufficient to answer the question. Suppose that we cut a die template out of paper and labeled the faces. This could be viewed as an "unfolded" die and would look as below.

Right Handed Die
Right-handed die template.

Like a die, this is a labeled object composed of 6 identical parts. But, if we were to throw the unfolded template on to a table, could we gather a 1/6 chance event from the result? No! Because the template is missing a critical element: pairwise symmetry. A die, more than just a collection of 6 identical faces, is 6 identical faces along with symmetric geometric relationships between the faces.

The template misses this symmetry because, for instance, the square labeled 1 and the square labeled 6 can be differentiated by the number of neighboring squares. Square 1 has 1 neighbor and square 6 has 4 neighbors.

Looks like we're back to square 1. buh dum tss

On a cube, each face has the same number of neighboring faces, and they are arranged geometrically such that the angles at which they meet are also identical. This induces critical pairwise rotational symmetry, i.e., no matter how you rotate an unlabeled cube (and rotation is what happens when rolling a die) the faces are indistinguishable.

A useful way to represent two indistinguishable features aa and bb is by showing a way to "associate" them. Formally, we want an isometry — a distance-preserving transformation (like rotation or reflection) that maps the object back onto itself while also sending aa to bb.

Let's see an example of this for faces. Consider the following animation.

Rotating a cube by 90 degrees across an axis running perpendicular through the centers of two opposing sides is an isometry that associates a face with one of its immediate neighboring faces (e.g., the front face becomes the top face in the animation).

There are three such axes we could choose, and each gives rise to different symmetries. We can compose them to move from any given face to any other face. Now we see that a die is an object with 6 identical elements and with rotational symmetry between these elements. And this directly leads to the ability to produce a 1/6 event when rolled.

Hence, the following theorem (which won't be proved here, but is motivated by the above discussion):

Let OO be a geometric object containing nn features partitioned into mm disjoint feature-sets F1,,FmF_1,\ldots,F_m with sizes F1,,Fm|F_1|,\ldots,|F_m|. For all 1im1 \le i \le m, OO can generate a Fi/n|F_i|/n event if the features all have pairwise rotational symmetry.

For the die, each feature-set contains a single face, so n=m=6n = m = 6. We know that the faces have rotational symmetry and therefore can be used to generate a 1/6 event by the theorem.

The theorem also checks out on the earlier example of a die-based coin flip (evaluate whether the roll is even or odd). Here, there are two feature-sets. F1F_1 consists of the 3 even faces and F2F_2 consists of the 3 odd faces. The even faces are indistinguishable from the odd faces for the same reason that any face is indistinguishable from any other face. By the theorem, we can generate a 3/6 = 1/2 event by looking for either an odd or even face on the roll.

If we can find new types of non-face features on the die which satisfy the theorem, then we can induce new and exciting probabilities.

Some New Distributions

Motivated by the theorem, we are now in search of features of the cube other than faces. Two natural choices to consider include the sides and corners. Since there are 12 sides and 8 corners, we could potentially use them to generate 1/12 and 1/8 events, respectively.

Good news: Edges are rotationally symmetric, and so are corners.

The transformation we gave in the previous section in the context of face symmetry also exhibits edge and corner symmetry. Another transformation would be to rotate 120 degrees about one of the main diagonals of the cube.

Or to rotate 180 degrees about an axis running through the center of opposite edges.

From seeing all of these symmetries, you should be able to convince yourself that edges and corners satisfy the conditions of the theorem. So now we can propose the following process:

Label the edges (corners) and roll the die. Identify the edge (corner) which is closest to you. This edge (corner) will appear with probability 1/12 (1/8).

For a standard die, we can label each edge by its pair of neighboring faces. So we'd have the (1,2)(1,2) edge bordering the faces labeled 1 and 2. Similarly, for each corner, we can label it with the three faces that border it (e.g, the (1,2,3)(1,2,3) corner touches the faces labeled 1, 2 and 3).

Orientation

The notation (1,2)(1,2) for edges and (1,2,3)(1,2,3) for corners is useful in a particular way: It suggest that perhaps there is something different between the edge (1,2)(1,2) and the edge (2,1)(2,1). Suppose you roll a die, and the die lands such that the 1 and 2 faces appear on the side. Either the 1 face is positioned to left of the 2 face or vice versa. Both are possible, corresponding with the die being upside-down or not. We call this positioning of the feature its orientation, and the new notation allows us to distinguish orientation for edges and corners.

Let's look at the consequences. There are 12 edges each with 2 orientations, and so now we have a means to produce a 1/24 event. Similarly, there are 8 edges each with 3 orientations, yielding an independent way to generate a 1/24 probability.

Even our faces have analogous orientation considerations. If we roll a number, there are 4 ways the side faces could be rotated while keeping the same top face value. 6 faces each with 4 orientations then gives 24 outcomes just like edges and corners.

It's a wonderful pattern we've found here, that all three of these features paired with orientation give way to 24 symmetries. This makes us wonder, just how many symmetries are there in a cube?

Octahedral Group

Group Theory formalizes the idea of symmetry into an algebraic setting, allowing us to derive interesting and powerful results. One such result, the Orbit-Stabilizer theorem, will allow us to answer the previous question of how many symmetries are contained in a cube.

In particular, we've been building up intuition toward understanding the Octahedral group. This group's elements are the symmetries of the cube in the form of the isometric transformations that we've been exploring in the animations. The group elements are combined via composition. For two symmetric transformations AA and BB, ABAB means first performing BB and then AA. These cube transformations with composition have all the nice properties that a group requires.

In addition, we've been considering the ways in which these transformations move features (faces, edges, corners) of the cube. This is formalized through a group action, which describes implications of allowing a group to act on a set. Here, we are allowing our transformations to act on the features of the cube.

Two fundamental concepts for group actions are orbits and stabilizers. Let GG be a group. An orbit GxG \cdot x of a set element xx is all the possible other set elements reachable from xx by applying group elements to it. For the cube and, say, its faces, the orbit of a face FF is all the faces reachable from it via symmetric transformations. We've already seen that all faces can reach each other, and so the orbit of any given cube face with respect to rotations is all the faces.

A stabilizer GxG_x of a set element xx is all the group elements that fix xx. For the cube and its faces, the stabilizer of a face FF is all the symmetric transformations which leave FF in the same position. In essence, this corresponds to the way in which we differentiated orientation of faces, edges and corners.

Orbits and stabilizers are related via the Orbit-Stabilizer theorem. An important consequence of the theorem states that for a finite group G and set element xx,

G=GxGx.|G| = |G \cdot x||G_x|.

The powerful thing about this theorem is the ability to infer the size of a group via combinatorial arguments on set elements. This equation reveals why we saw the magic number 24 when combining faces, edges and corners with their respective orientations. We were multiplying the size of each feature's orbit (6 faces, 12 edges and 8 corners) by the size of their stabilizers (4 face orientations, 2 edge orientations and 3 corner orientations).

By doing so, we have inadvertently discovered all of the symmetries of the cube realizable by physical transformations. But, there are also non-physical transformations that similarly preserve the geometric structure of the cube.

Chirality

The full Octahedral group OhO_h contains not just 24 but 48 elements. This comes from the addition of one more transformation, namely flipping the cube inside out! Clearly this is not possible in the real world, but the math checks out. Flipping the cube inside out is of order 2 since applying it twice is the identity transformation. So we gain 2 times more symmetries than before. This happens by applying the inside out transformation to each physical symmetry to achieve 24 new non-physical ones.

To conceptualize this idea further, it may help to step down a dimension to look at a square in the plane. We can rotate the square by 90 degrees as a symmetry. One thing we could imagine is taking the square out of the plane, flipping it over and placing it back down. Think flipping a pancake in a hot pan. The new orientation would not achievable purely by rotations in the plane.

Chiral Squares
Squares with clockwise (left) and counterclockwise (right) chirality

In the figure, the left square has corners labeled in clockwise order and the right in counterclockwise order. The only way to rotate one to become the other is to rotate out of the plane, utilizing three-dimensional space. Similarly with a cube, we can pull the cube into an imaginary 4th dimension and perform our rotation there to get a new orientation unachievable by ordinary rotations.

Application: Counting Labeled Dice

Challenge: Count the number of distinct dice with faces labeled one through six.

We could try to exhaustively list out all the labelings, but this seems daunting and error prone. Instead, let's apply our new knowledge of dice symmetries.

There are 6 choices for the first side, 5 choices for the next side, etc. So there are at most 6!=654321=7206! = 6*5*4*3*2*1 = 720 ways to label the dice. But, we've over counted dice due to the 24 physical symmetries that we discovered previously. Each labeling we counted is the same as 23 other labelings up to rotation of the die. Hence, there are actually 6!/24=306!/24 = 30 ways to label the die.

Interestingly, standard dice come with an additional restraint on the labels: Opposite face labels must add to 7. So now, we may try to count the number of standard dice labelings. There are 6 choices for the first side, and then the opposite side is determined. Then there are 4 choices for the third side, and its opposite is determined. Lastly there are 2 choices for the fifth side, and its opposite is also determined. So there are 642=486 * 4 * 2 = 48 labelings ignoring symmetry. Deduping with symmetry, there are then only 48/24=248/24=2 ways to label a standard die!

There are names for these two distinct standard dice: right-handed and left-handed dice. The first section gave an example of a right-handed die template. By swapping a pair of opposite faces, we arrive at the left-handed die. These two possibilities are different with respect to physical symmetries due to their differing chirality.

Left Handed Die
Left-handed die template.

Fun fact: Western dice are right-handed whereas Chinese dice are left-handed.

Conclusion

From the seemingly mundane 6-sided die, we've uncovered a deep analysis based on probability and group theory. We now know of ways in which to generate 1/8, 1/12 and 1/24 probability events with ordinary dice. And we have developed the understanding that 1/24 is the best we can hope for. That is unless, in the process of rolling our die, it happens into the fourth dimension for a chance to turn inside out.

In the next post, we'll apply the analysis here to code up algorithms representing these new distributions. We'll then combine these distributions with computer graphics to visualize the dice and processes that use the dice, leading to visually beautiful fractals with their own interesting analysis.

Receive emails about new posts and subscriber-exclusive content.

Copyright © 2022 Robert Adkins. All rights reserved.