Dicy dice

Joined
Sep 20, 2022
Messages
317
Reaction score
41
I was wondering, if I took 8 dice and glued them together to make a 2x2x2 cube, how many different cubes are possible.

That was biting off a bit more than I could chew, so I narrowed it down to gluing dice in a straight line to make a rod.

I have an idea for a general function for n dice, but I need to check it against a brute force (obviously correct) program.

Currently my brute force method isn't fast enough to go beyond n=4 in a reasonable amount of time.

There are 24 ways to orient a die, so I enumerate length n permutations of base 24. There are 8 ways to view a rod as a permutation, so for each permutation, I generate the other 7 views, if the current permutation is the smallest, I count it, otherwise ignore it.

I'm looking for a better brute force approach.
 
Joined
Sep 20, 2022
Messages
317
Reaction score
41
1x1xn turns out to be a bit trivial.

Brute force 1x2x2 is possible (41694) and agreed with my function, but the shape is too simple.

2x2x2 works out to be 4586595984, but there's no way I'm checking that by brute force.

Normally I'd check my functions against values in the online encyclopedia of integer sequences, but gluing dice isn't a thing.
 
Joined
Sep 20, 2022
Messages
317
Reaction score
41
This may seem a tad esoteric and useless, but the function that solves the dice can also solve other orientation problems.

For example, I can place coins on a 8x8 board in 2^64 ways. Some are heads up, some tails. If I allow the board to move, the count is less because some rotations are equal.

If the board is made of glass, I can flip it over and the count gets even smaller. But flipping changes the coins' direction, and that's the tricky bit.

Brute force can confirm the count of a 4x4 board, I suppose that's something.
 
Joined
Sep 20, 2022
Messages
317
Reaction score
41
These arrangements are turning out to be interesting. I was running out of things to count.

I was searching for algorithm discussions in the "talk" page of wikipedia articles about algorithms, and came across the Gnome sort. There's something appealing about its simplicity.

IMO there is a strong similarity between algorithms and knot tying. The taut-line hitch blows my mind.

Over and out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,470
Messages
2,571,807
Members
48,797
Latest member
PeterSimpson
Top