Join 3,556 readers in helping fund MetaFilter (Hide)


Calculate Possible Combinations
December 1, 2009 4:38 PM   Subscribe

How many combinations are possible in this grid?

I have a grid with four cells in it; two rows by two columns. Each cell has a symbol in it; either Sun, Moon, Star, or Egg. Each symbol has four potential orientations; 0°, 90°, 180°, & 270°. An example layout might be:

Sun-90° Moon-180°
Star-90° Egg-270°

How many unique layouts are possible, if each symbol must appear once and only once in each unique layout? Also, by unique, I mean do not rotate the entire grid -- for example, the below would be unique because it is not the same as the example above, even though the "markup" here has been "rotated:"
Star-90° Sun-90°
Egg-270° Moon-180°

But the example below would not be unique:
Star-180° Sun-180°
Egg-0° Moon-270°
Because it is the same as rotating the entire grid in the first example.
posted by rahnefan to Science & Nature (12 answers total) 1 user marked this as a favorite
 
Hmm well start by ignoring the rotation part. There are 4*3*2*1 ways to choose the symbols, that's 12. For each there are 4 rotations so 36 total.

Each of these has 3 other grids that are a rotation of this grid, so divide the number by 4 and you get 9.
posted by RustyBrooks at 4:54 PM on December 1, 2009


If I wasn't clear enough, any symbol can appear in any cell, so long as all four symbols are used in each combination. Thanks.
posted by rahnefan at 4:54 PM on December 1, 2009


There are 4! ways to array the symbols and 4^4 symbol orientation combinations for each array. Each combination can appear in four grid orientations, so I'm thinking the answer is (4!*(4^4))/4 = 1536.
posted by The Michael The at 4:54 PM on December 1, 2009 [1 favorite]


I like 1536 a lot more than 9! :) But I don't follow either of you. Which is fine, which is fine.
posted by rahnefan at 4:57 PM on December 1, 2009 [1 favorite]


There are 4 ways to rotate each of 4 symbols, so there are 4 *4 = 16 different things that could appear in your grid. Place any of the 16 in the first square. Then there will 3 symbols left which can each be orientated 4 ways; there will be 3*4 = 12 different things that could go in the next square. Then there will 2 symbols left which can each be orientated 4 ways; there will be 2 * 4 = 8 different things that could go in the next square. Finally there will be 1 symbol left which can be orientated 4 ways; there are 4 different things that can go in the last square. Multiply together: 16*12*8*4. Then divide by 4, because any grid can be rotated in 4 ways to produce 4 non-unique solutions.

(16*12*8*4)/4 = 1,536
posted by 23skidoo at 5:05 PM on December 1, 2009


4! is shorthand for 4*3*2*1 = 24 [which is the number of unique ways you can arrange the four symbols: four choices for the first square, then three choices for the second square, then two choices for the third square, and only one left over for the fourth square.

For any unique arrangement, each symbol has four different orientations, so you multiply by four once for each symbol. That's 4^4 = 4*4*4*4 = 256 ways of orienting the symbols for a given arrangement. The total is 256*24 unique arrangements. Then divide by 4 to remove arrangements that are rotations of each other. The result is 256*6 = 1536.

Rustybrooks was wrong because I think he got confused between the angles you were describing and the angle of the overall arrangement?
posted by PercussivePaul at 5:07 PM on December 1, 2009


Ok.
There are 4! = 24 ways to distribute the four symbols in the grid in any given orientation of symbols.

There are 4^4 = 256 ways to orient any given distribution of symbols.

There are therefore 24 * 256 = 6144 naive distributions. We now have to eliminate the "duplicates", i.e. the arrangements that are rotations of each other.

If we imagine we already have the set of unique arrangements, then for each unique arrangement, there are exactly 4 rotations.

Therefore, the final number of unique arrangements is 6144 / 4 = 1536

Or, on preview, what TMT said. Damn, scooped!

PS: If reflections don't count as unique either, then the number is 1536 / 2 = 768

PPS: Some of those symbols, like the "sun" or the "star" don't seem like they would have unique rotations. Is that supposed to figure into this?
posted by Salvor Hardin at 5:07 PM on December 1, 2009


No, it's not a trick question -- Sun is drinking tequila and Star is smoking a pipe, so they too have unique rotations. None of them can have reflections either.

Witness the strength of you math guys. Awesome. Thank you very much.
posted by rahnefan at 5:13 PM on December 1, 2009


Yeah I was a little unclear on what rotation meant I guess. I also multipled 12*4 and got 36 but that's irrelevant anyway.
posted by RustyBrooks at 6:15 PM on December 1, 2009


Crap, I went and resolved it prematurely.

What does the number become if each cell has a reverse side, and there are four additional symbols that can be used, say, Dog, Cat, Fish, and Bird (again, no symbol can appear twice in any layout, but obviously you can't use all eight in only 4 cells), each with the same four possible orientations?
posted by rahnefan at 7:16 AM on December 2, 2009


Wait -- you can only answer that question if you know what is on the reverse of what. Here's how it goes: Sun/Dog, Moon/Cat, Star/Fish, and Egg/Bird.
posted by rahnefan at 7:17 AM on December 2, 2009


Each symbol has two sides. Thus for each unique arrangement of symbols there are 2*2*2*2 ways to flip/unflip them. So multiply the total by 16.
posted by PercussivePaul at 8:40 AM on December 2, 2009


« Older This season I would like to ra...   |  Can you suggest suitable sound... Newer »
This thread is closed to new comments.