# The Various Workings of a Cube-Shaped Gallery

April 24, 2007 6:14 PM Subscribe

Imagine a cube-shaped building, with ten cube-shaped rooms along each side (10 rooms long, 10 high & 10 deep). Each cubular room has 4 walls, 1 ceiling and 1 floor. Each of the 6

To restipulate the numbers:

- A cube gallery with 10 cube rooms along each side (10x10x10)

- Each cube room has 6 pieces of art on its interior surfaces

- All the cube rooms are capable of being rotated into every possible variation (ceilings becoming walls becoming floors etc.)

Thanks in advance!

*interior*surfaces in all 1000 cubular rooms is decorated with a different piece of art. The rooms can be moved around the building, as if it were an enormous Rubik's cube, but they can also be spun on their axes, so all 6 walls of all 1000 cubes is capable of touching all the others (if the cube is so arranged). How many combinations of art within the 'Cube Gallery' are possible? If you can run me through the workings of the maths I would be extra grateful. Also, what technical words/phrases/language are useful/interesting in expressing this concept?To restipulate the numbers:

- A cube gallery with 10 cube rooms along each side (10x10x10)

- Each cube room has 6 pieces of art on its interior surfaces

- All the cube rooms are capable of being rotated into every possible variation (ceilings becoming walls becoming floors etc.)

Thanks in advance!

I think you would have 1000! (1000 factorial) arrangements of the rooms within the 10 x 10 x 10 building, and 24 possible orientations of each room, making for

1000! * 24^1000 combinations.

Think of assigning each of the room locations in the 10x10x10 building a number from 1 to 1000. If you start with an empty building you have 1000 choices for which room goes in location #1, then 999 choices for location #2, etc.

Each room can have one of its six sides facing up, and with that side up you can rotate it into four different orientations, so each room has 6*4=24 orientations.

Also, you need to see the Cube movies.

posted by thrako at 6:37 PM on April 24, 2007

1000! * 24^1000 combinations.

Think of assigning each of the room locations in the 10x10x10 building a number from 1 to 1000. If you start with an empty building you have 1000 choices for which room goes in location #1, then 999 choices for location #2, etc.

Each room can have one of its six sides facing up, and with that side up you can rotate it into four different orientations, so each room has 6*4=24 orientations.

Also, you need to see the Cube movies.

posted by thrako at 6:37 PM on April 24, 2007

Are the initially-exterior surfaces artless?

posted by joannemerriam at 6:38 PM on April 24, 2007

posted by joannemerriam at 6:38 PM on April 24, 2007

Can any of the walls flip around? (think swiveling bookcase/fireplace)

posted by iamkimiam at 6:57 PM on April 24, 2007

posted by iamkimiam at 6:57 PM on April 24, 2007

*Also, what technical words/phrases/language are useful/interesting in expressing this concept?*

Combinations and Permutations

posted by vacapinta at 7:06 PM on April 24, 2007

Yes, thrako has it.

The number 1000! is here. or approximately 4.0238726 x 10^2567.

24^1000= approx 1.2753249 x 10^670

Multiply them together, you get 5.13174492 x 10^3237. Approximately.

If you need it more exactly, you can download a copy of Big-Calc from Justin, who figured out 1000! with it.

posted by beagle at 7:11 PM on April 24, 2007

The number 1000! is here. or approximately 4.0238726 x 10^2567.

24^1000= approx 1.2753249 x 10^670

Multiply them together, you get 5.13174492 x 10^3237. Approximately.

If you need it more exactly, you can download a copy of Big-Calc from Justin, who figured out 1000! with it.

posted by beagle at 7:11 PM on April 24, 2007

For perspective, estimates of the number of atoms in the about 80 billion galaxies of the observable universe are less than 10^100.

If you took every atom in the observable universe and made each and every one its own observable universe, and if every atom in every one of those universes was its own universe, you wouldn't even come remotely close to the number of combinations in your example.

posted by ROU_Xenophobe at 7:30 PM on April 24, 2007 [1 favorite]

If you took every atom in the observable universe and made each and every one its own observable universe, and if every atom in every one of those universes was its own universe, you wouldn't even come remotely close to the number of combinations in your example.

posted by ROU_Xenophobe at 7:30 PM on April 24, 2007 [1 favorite]

When you stop using "cubular" (thanks, rob511) you can start using "cubic" instead.

posted by janell at 7:36 PM on April 24, 2007

posted by janell at 7:36 PM on April 24, 2007

thrako is right if every room can reach every position, but if only Rubik-style moves are allowed, this isn't the case--for example, there's no way for a corner piece to move anywhere except another corner position. Or for one of the interior rooms to reach the outside.

The real Rubik's cube only has something like 4 x 10^19 states (IIRC), for example, while 27! is more like 10^28.

I have no idea what the actual answer for the 10x10x10 building is; hopefully someone who knows some group theory will chime in...

posted by equalpants at 7:38 PM on April 24, 2007

The real Rubik's cube only has something like 4 x 10^19 states (IIRC), for example, while 27! is more like 10^28.

I have no idea what the actual answer for the 10x10x10 building is; hopefully someone who knows some group theory will chime in...

posted by equalpants at 7:38 PM on April 24, 2007

beagle, how did you calculate 24^1000?

I get a number that is about 1.626 x 10^1380 (mouse over for exact value)

This gives you a real value of 6.545 x 10^3947

posted by Mr Stickfigure at 8:16 PM on April 24, 2007

I get a number that is about 1.626 x 10^1380 (mouse over for exact value)

This gives you a real value of 6.545 x 10^3947

posted by Mr Stickfigure at 8:16 PM on April 24, 2007

Do exact mirror images and entire rotations count? For example, if the door is on the south and I carefully rotate and move all of the rooms so that the door is on the north, but someone who enters without seeing where the door is would experience the exact same thing....

(Also curious to know if this is homework, table conversation, or puzzle making gone horribly wrong.)

posted by anaelith at 8:44 PM on April 24, 2007

(Also curious to know if this is homework, table conversation, or puzzle making gone horribly wrong.)

posted by anaelith at 8:44 PM on April 24, 2007

**0bvious**posted

*"If you can run me through the workings of the maths I would be extra grateful."*

Since thrako's already done te math, let me give you some advice that will make approaching your next problem easier: if you are confounded by how to understand teh problem for a 10x10x10 cube, try understanding the problem for a smaller problem. (This is basically what's called

*mathematical induction*.)

Let's start with a 1x1x1 cube, that is a single room. That factors out the arrangement of rooms in relation to each other, which makes salient the factor of one room's rotation, the 6 * 4 thrako points out. (This is basically decomposing the problem into its component problems). In your mind's eye, you rotate a cubic die ("a dice"). It clearly has six faces, and since fixing one face

*up*fixes the opposite face

*down*, you're left with four faces that can be rotated (or if you prefer, fixed in some direction

*normal*or

*orthogonal*to the face fixed up) around the fixed up and down faces: so, 6 * 4.

OK, now let's think of a 2x2x2 cube. This is also easily visualized, and we can easily "count" the component cubes: 2x2 gives us four on the "bottom" and four on the "top". Now mentally remove the actual cubes (mentally put them in a pile), leaving the 8 positions they can fill. If we arbitrarily designate one of these eight as "position one", and "fill" it with a cube from the "pile", we are left with seven positions to fill. Take another from the pile and fill any one of those seven positions, we are left with six positions to fill. Each time we fill a position, we have one fewer cube to place, and one fewer place we can put it.

So in filling the 8 positions in a 2x2x2 cube, we have 8 choice followed by seven choices followed by .... 2 two choices followed by one choice. So the number of choices is 8 times 7 times .., two times one. This come sup often enough that it's got a special name,

*factorial*, and a special notation, the biggest number followed by an exclamation point, e.g.,

*8!*.

So the answer for a 2x2xw2 cube is (2*2*2)! * (6 * 4 rotations) = 8! * 24. We can observe that the same rules apply to a 3x3x3 cube, so the same equation works, just plugging in 3:

(3*3*3)! * (6*4) = 27! * 24. So on to four, and all the way up to 1000.

And so given some practice with this technique, you don't need askMe to get youe answer.r

posted by orthogonality at 9:10 PM on April 24, 2007

combinatorics is the branch of maths that deals with this.

some example problems

posted by LobsterMitten at 9:32 PM on April 24, 2007

some example problems

posted by LobsterMitten at 9:32 PM on April 24, 2007

orthogonality is not quite correct; you forgot to account for the orientation of all the cubes. thrako's original answer, 1000! * 24^1000 is right.

posted by number9dream at 10:02 PM on April 24, 2007

posted by number9dream at 10:02 PM on April 24, 2007

Been thinking about this some more: we can figure out how many places a room can be in by looking at how many steps away it is from the nearest corner.

Start with the corners themselves: they can only move to other corners, so there are 8! ways to arrange them (independent of the rest of the building).

Now, the rooms immediately adjacent to the corners: there are 24 of them (3 per corner), and if you rotate things around in your mind, you can see that each of them can move to any other spot immediately adjacent to a corner, so there are 24! ways to arrange them.

How about the rooms that are one step away from a corner in one direction, and two steps in another direction? There are 6 such rooms for each corner, and they can all reach each other's positions, so there are 48! ways to arrange these guys.

We can do the same for all of the room positions in the 5x5x5 cube nearest a corner. In general, if a room is [x, y, z] steps away from the nearest corner, it can reach 8 * (the number of distinct combinations of the elements x,y,z) different places within the building. (Example: there are three distinct combinations of two 0s and a 1, [0,0,1], [0,1,0], [1,0,0], so a room that's any of those distances away from a corner can reach 24 places, as above.)

So we can count up the total number of arrangements thusly:

-there are 8! ways to arrange the 8 rooms at distance [0,0,0]

-there are 24! ways to arrange the 24 rooms at distance [0,0,1] or some permutation of [0,0,1]

-24! for [0,0,2] and its permutations

-48! for [0,1,2] and its permutations

...etc. After we multiply all these together, we may or may not want to divide by 24 (the number of ways to orient the whole building). And then we multiply by 24^1000, for the room orientations.

This is an upper bound, but it may not be the actual number; we know that any single room can reach any position that's the same distance from its corner, but we're also assuming that any pair of rooms in the same distance-class can reach any pair of positions relative to each other, and I'm not sure that's true. (Anyone?)

on preview: Again, this is for the case where only Rubik-type moves are allowed. If you have some other method of moving rooms, such that any room can reach any position, then thrako, orthogonality, et. al. are right.

posted by equalpants at 10:28 PM on April 24, 2007

Start with the corners themselves: they can only move to other corners, so there are 8! ways to arrange them (independent of the rest of the building).

Now, the rooms immediately adjacent to the corners: there are 24 of them (3 per corner), and if you rotate things around in your mind, you can see that each of them can move to any other spot immediately adjacent to a corner, so there are 24! ways to arrange them.

How about the rooms that are one step away from a corner in one direction, and two steps in another direction? There are 6 such rooms for each corner, and they can all reach each other's positions, so there are 48! ways to arrange these guys.

We can do the same for all of the room positions in the 5x5x5 cube nearest a corner. In general, if a room is [x, y, z] steps away from the nearest corner, it can reach 8 * (the number of distinct combinations of the elements x,y,z) different places within the building. (Example: there are three distinct combinations of two 0s and a 1, [0,0,1], [0,1,0], [1,0,0], so a room that's any of those distances away from a corner can reach 24 places, as above.)

So we can count up the total number of arrangements thusly:

-there are 8! ways to arrange the 8 rooms at distance [0,0,0]

-there are 24! ways to arrange the 24 rooms at distance [0,0,1] or some permutation of [0,0,1]

-24! for [0,0,2] and its permutations

-48! for [0,1,2] and its permutations

...etc. After we multiply all these together, we may or may not want to divide by 24 (the number of ways to orient the whole building). And then we multiply by 24^1000, for the room orientations.

This is an upper bound, but it may not be the actual number; we know that any single room can reach any position that's the same distance from its corner, but we're also assuming that any pair of rooms in the same distance-class can reach any pair of positions relative to each other, and I'm not sure that's true. (Anyone?)

on preview: Again, this is for the case where only Rubik-type moves are allowed. If you have some other method of moving rooms, such that any room can reach any position, then thrako, orthogonality, et. al. are right.

posted by equalpants at 10:28 PM on April 24, 2007

Wow, thanks to everyone for your help.

To answer where this problem came from: me. I was thinking about the ways in which art in a gallery is juxtaposed. Sme galleries choose a linear narrative to the structure of their gallery (i.e. show 1912 before 1913 pieces). Some galleries take a more abstract approach, choosing vague connections by which to order their galleries.

I wondered about a gallery which could have its arangements altered, perhaps daily, perhaps on a whim, perhaps organically or by some kind of function, and then the movie 'Cube' came to mind and then my ideas started flying.

I never thought the numbers would be so unbelievable!

1000! * 24^1000 is scary

Can anyone explain what the exclamation mark means?

posted by 0bvious at 2:13 AM on April 25, 2007

To answer where this problem came from: me. I was thinking about the ways in which art in a gallery is juxtaposed. Sme galleries choose a linear narrative to the structure of their gallery (i.e. show 1912 before 1913 pieces). Some galleries take a more abstract approach, choosing vague connections by which to order their galleries.

I wondered about a gallery which could have its arangements altered, perhaps daily, perhaps on a whim, perhaps organically or by some kind of function, and then the movie 'Cube' came to mind and then my ideas started flying.

I never thought the numbers would be so unbelievable!

1000! * 24^1000 is scary

Can anyone explain what the exclamation mark means?

posted by 0bvious at 2:13 AM on April 25, 2007

! is shorthand for factorial,

5! or "five factorial" = 5*4*3*2*1

n! = n*(n-1)*(n-2)*(n-3)*...1

posted by garethspor at 3:58 AM on April 25, 2007

5! or "five factorial" = 5*4*3*2*1

n! = n*(n-1)*(n-2)*(n-3)*...1

posted by garethspor at 3:58 AM on April 25, 2007

also, that sounds like a horrible gallery. paintings on the floor?

posted by garethspor at 4:00 AM on April 25, 2007

posted by garethspor at 4:00 AM on April 25, 2007

*beagle, how did you calculate 24^1000?*

I get a number that is about 1.626 x 10^1380 (mouse over for exact value)

This gives you a real value of 6.545 x 10^3947

I get a number that is about 1.626 x 10^1380 (mouse over for exact value)

This gives you a real value of 6.545 x 10^3947

Mr. Stickfigure is correct, I messed up a step. Thanks for checking the math.

One way or the other, it's a gazillion.

posted by beagle at 5:52 AM on April 25, 2007

You'll probably enjoy The Library of Babel.

posted by hoverboards don't work on water at 6:09 AM on April 25, 2007

posted by hoverboards don't work on water at 6:09 AM on April 25, 2007

Isn't one thing being forgotten in the straightforward maths- the idea of redundant configurations? If we're able to pivot the individual rooms in any direction, and move the rooms around in any relation to each other, isn't it the case that for every possible configuration of rooms, there are numerous permutations of the super-cube that exactly mimic it, but is just oriented differently- i.e. where the individual rooms are oriented and adjacent in exactly the same way in relation to each other, except that we the outside observer see that as the whole super-cube being upside down or on its side?

To use the "simplest example", think of a normal six sided die, a 1x1 cube. Imagine if you could rotate the die any way you want, and also repaint the pips on any side you want. Now with a regular die, if you flip it upside down it's just the same die, but only appears different from your perspective. Since that's a die where you can't move the pips in relation to each other but just rotate it has one and only one configuration,

So for a given 1x1 cube where you can manipulate the faces and the orientation of the cube, it's the same thing: there are 24 possibly orientations in relation to you the outside observer, and 6! configurations of the "art" on the walls (the pips), but for any of the given orientations times pip-configurations (6!), they will be exact copies of 23 other configurations, but only "appear" to be different in relation to you the outside observer because of how you are oriented- but they are in fact identical structures. You've done 24* 6!, but have to promptly divide by 24 again to get the

This also happens for a 2x2 or 3x3 cube, in that if you made a stack of 8 dice in a 2x2 configuration, as you pivot and rotate them, there are combinations that become just the same as other combinations, but the "structure" is what has appeared to rotate. Take the top front left single cube, rotate it 180 on each axis, put it in the bottom back right space, and do the same transform with every die. The resulting structure will be just like your starting structure, but you'd have to be upside down and looking at it from behind to see it the same way.

So in short, for any of the possibilities of an NxNxN super-cube, each possibility has 23 exact duplicates that occur which only are different in regards to how the total super-cube is oriented to the outside observer.

I'd say that the real answer is = thrako's original answer / 24

posted by hincandenza at 9:07 AM on April 25, 2007

To use the "simplest example", think of a normal six sided die, a 1x1 cube. Imagine if you could rotate the die any way you want, and also repaint the pips on any side you want. Now with a regular die, if you flip it upside down it's just the same die, but only appears different from your perspective. Since that's a die where you can't move the pips in relation to each other but just rotate it has one and only one configuration,

*24- you're just flipping it in relation to yourself, but the internal relations of the die faces stay the same.***not**So for a given 1x1 cube where you can manipulate the faces and the orientation of the cube, it's the same thing: there are 24 possibly orientations in relation to you the outside observer, and 6! configurations of the "art" on the walls (the pips), but for any of the given orientations times pip-configurations (6!), they will be exact copies of 23 other configurations, but only "appear" to be different in relation to you the outside observer because of how you are oriented- but they are in fact identical structures. You've done 24* 6!, but have to promptly divide by 24 again to get the

*unique*configurations, since there are identical configurations.This also happens for a 2x2 or 3x3 cube, in that if you made a stack of 8 dice in a 2x2 configuration, as you pivot and rotate them, there are combinations that become just the same as other combinations, but the "structure" is what has appeared to rotate. Take the top front left single cube, rotate it 180 on each axis, put it in the bottom back right space, and do the same transform with every die. The resulting structure will be just like your starting structure, but you'd have to be upside down and looking at it from behind to see it the same way.

So in short, for any of the possibilities of an NxNxN super-cube, each possibility has 23 exact duplicates that occur which only are different in regards to how the total super-cube is oriented to the outside observer.

I'd say that the real answer is = thrako's original answer / 24

posted by hincandenza at 9:07 AM on April 25, 2007

*I'd say that the real answer is = thrako's original answer / 24*

Thats what anaelith said above. From any reasonable order of magnitude perspective, dividing the answer by 24 makes no difference at all, its a negligible rounding error.

posted by vacapinta at 11:00 AM on April 25, 2007

Too see if you've mastered the math, try ingesting 1000mcg of LSD, and then repeating the factorial calculation while pondering

a) the numbers involved

b) the various pieces of art you could use

c) the complications of ordering multiple genres in a giant rubiks cube. alphabetical? chronological? themed? by color?

d) the cost of whooooaaaaahhh colors are melting banana squidbubble flange octahedral cube self dribbling basketball courts.

It won't help, but it'll sure be fun. Disclaimer: This is not an order to take LSD. It is a joke.

posted by lalochezia at 7:55 PM on April 25, 2007

a) the numbers involved

b) the various pieces of art you could use

c) the complications of ordering multiple genres in a giant rubiks cube. alphabetical? chronological? themed? by color?

d) the cost of whooooaaaaahhh colors are melting banana squidbubble flange octahedral cube self dribbling basketball courts.

It won't help, but it'll sure be fun. Disclaimer: This is not an order to take LSD. It is a joke.

posted by lalochezia at 7:55 PM on April 25, 2007

Whoops- guess I missed that post. But it *does* change the order of magnitude, and since this is a purely hypothetical situation, we may as well be precise. :)Thats what anaelith said above.

posted by hincandenza at 10:12 AM on April 26, 2007

« Older How to make my router work with new settings ASUS... | I add artwork to my ipod but it doesn't show up! Newer »

This thread is closed to new comments.

posted by grateful at 6:29 PM on April 24, 2007