Epic Systems Interview Question
how?
i think its 6!/8
1st color 6, 2nd color 5 ... and so on 6!
since 3 colors are same its 1/2 * 1/2 * 1/2
so 6*5*3 = 90
not, you underestimate the charm of symmetry.
Actually, it's not hard to just enumerate all situations:
note: in format a+b+c, a,b,c to denote # of occurrence for each color (small number comes first).
Now situations are:
a+b+c description # of difference cubes
0+0+6; use only one kind of color; C(1,3) = 3
0+1+5; use two kinds of color; P(2,3) = 6
0+2+4; use two kinds of color; P(2,3)*2 (why 2? think!)
0+3+3: use two kinds of color; C(1,3)*1 (why 1? think!)
1+1+4: three color all used; 6
1+2+3: P(3,3)*2
2+2+2: 2+3
just sum up, u get the ans
why are combinatorics notations reversed (P(n,r) with n>=r is the right notation). But more importantly, the correct value for 0+3+3 is C(3,2)*2 since there are 2 ways (after considering symmetry - 3 surfaces all of which meet at the same corner or 3 surfaces with 2 opposite vertical surfaces and 1 of the horizontal surfaces). {also C(3,2)=C(3,1) so that part is correct}
for 1+1+4 the split up is C(3,2)*2....the first part since you need to decide the two colors that get only one surface. the 2 because you can place them on adjacent surfaces that share an edge or on opposite surfaces.
The final two are the toughest to explain so Ill leave it at this.
but otherwise a good way to represent the solution. thanks
I think there's something still wrong...
What is being said in this thread is that each unique combination of paints is basically represented by the no. of times each color occurs, i.e. (if colors are R,G,B, then) there is only one way to paint the cube with 2sides R, 2sides G, 2sides B
but this is incorrect...
U r welcome.
It is nice to see so many nice people helping out!
(I suck at programming and I need a damn job.)
http://en.wikipedia.org/wiki/Burnside%27s_lemma
- chao October 03, 2009Burnside Lemma (in fact Cauchy found it...)
The problem is also there.