I've got a puzzle I'm working on and I'm a little obsessed with it. It's been a long time since I've worked with permutations, way back in high school actually.

Anyway given a stack of four dice (normal six siders) how many ways can they be arranged( position AND orientation), so how many different ways can they be ordered and facing.

The order is easy it's just 4! so 24 possible positions. Then the orientations come in. Each dice can be facing six ways at any position. So I came up with 6X6X6X6 = 24 orientations at each position and with 24 positions 24X24 = 576.

Am I doing this right?

For any given die, you will have 4 possible orientations for a given side and 6 sides to account for, meaning that EACH die has 24 possible orientations.

You have four dice, each having 24 orientations, or 24

^{4}possibilities for a given sequence of dice, or rather 331,776 orientation possibilities.But, the dice can be in any order and the 4 dice have four valid positions each (or 4

^{4}) or 16 positions.This brings your actual number of possible combinations you may arrange the four dice (16 x 331,776) to 5,308,416.

But that's just back of the envelope math.

--DDTM

When you mean to multiply do so, I added. Now I'm getting 31104 total combinations, much more than 576.

I think you gave to many possibilities doug-doug. For any given die, the side facing the viewer can be in any rotation and counts only once. That is, if die A has 5 facing the viewer it doesn't matter whether 5 appears correct, upside down, rotated counter clockwise, or clockwise. As long a 5 is facing the view that's all that matters.

So I came up with 24 possible arrangements, and in each arrangement each die can show one of 6 faces. So, 6 X 6 X 6 X 6 = 1296 and 1296 X 24 = 31104.

That's what I'm coming up with.

...if that is the case, vice the larger set I assumed, you are correct.

--DDTM

I'm going over this again, and I'm convinced that when not counting the rotation of the dice there are 31,104 combinations position and orientation.

But when I take into account rotation as DDTM did I get a different number. DDTM says that any die can have 4 valid positions, bottom, bottom-middle, top-middle, or top. That makes sense. But is 4

^{4}the correct number? That gives 16 possible orders. I think that 4! is the correct way to get the number of orders giving 24 orders not 16. I believe you represent the possible orders as combinations of n objects taken from a pool of t total objects. The equation is combinations = n!/t-n!. Since t and n both = 4 you get 4!/4-4!; which = 4!/0!; which = 4!/1; which = 4! = 24.With each die having 24 possible orientations and rotations (6 orientations X 4 rotations) per stack and 4 dice in a stack (24 X 24 X 24 X 24) you get 331,776 combinations per stack times 24 possible stacks I get 7,962,624 combinations not DDTM's 5,308,416. stack = order

Anybody have a follow up or notice in error in what I'm doing?

EDIT [Clarifications]

I go there by also assuming that the sequence of the dice considered each combination of unique positions such that the following dice combinations exist:

4 dice in 4 different positionsThe answer for that part is indeed 4! My bad. :o

--DDTM

7,962,624 is correct if the dice are different colors. With four dice and 24 orientations (6 possible face values and 4 rotations at each face value) per die, there are, indeed, 24x24x24x24 combinations. These dice can be permuted 24 ways (=4!) for a total of 7,962,624.

But the permutation operation only makes sense if the dice are different colors (imagine swapping around dice where the "1"is face forward and the "4" in on the right on all four dice). If the dice are the same color, the total number of unique patterns is only 24x24x24x24 since any pattern can be made by setting the face position and orientation of each of the four dice.

You got that idea. I don't think it matters what the colors are or even if the dice are labeled. As long as you recognize that each die is individual.

This was fun.