- 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.
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.