Challenging math question! Need help with logical reasoning of the answer. ENCL
@alchemista
@wolfe8
Logically, you have to take care that the cubes that have appeared in the same row/column in one layer, should not repeat in the same column or row in another layer
It will be more like solving a Sudoku puzzle
only this seems to have multiple answers
Yeah. But how shall I actually show it for n*n*n, I got 2 possible solutions for 3*3*3 and 1 solution for 4*4*4. But have no idea, how I should explain n*n*n!
I can show you the 4*4*4 solution if it helps.
do you have to find the number of solutions in case of nXnXn cubes
No, we have to describe a way to make one of them. I am just wondering, how to do that mathematically.
why only 4 colors?
This is just an attempt from my side 1. First fill the first layer randomly with any n colors 2.Next in the second layer, first row we choose any n colors which is NOT in the first row and corresponding columns of the first layer. 3. Next in the second layer, second row choose n color which are NOT in the second row and corresponding column of second layer. Continue in this manner
^^ I made a few corrections.
This can be solved by using a greedy constraint satisfaction algorithm I think, with no backtracking necessary. The idea is to solve it in order of most constraints to least constraints. Initially, none of the squares have any constraints, so choose a random face and make any valid assignment to the nxn squares. Now, choose squares in the order of most constraints to least constraints. You choose squares with the most constraints because they have the fewest degrees of freedom, so you must make sure to do a valid assignment to them first. Proceed in this fashion, making assignments to those squares with the most constraints currently present, until all squares are assigned.
Note that I didn't try this algorithm on anything, so be warned. If I was making a computer solve this, this is what I would do -- often, however, backtracking (undoing moves when a local optimum is reached) will be necessary, but I suspect that isn't the case for this problem.
I just realized that we don't really care about current constraints, but actual constraints. Corners have the most constraints (squares on three different faces), edges have the second-most number of constraints (squares on two different faces), and interiors have the fewest constraints (squares on one face). So, assign corners first. Then, assign edges, but do so in a way that is most current constraints to least current constraints. Finally, assign interiors.
Yes, that is exactly how i did them for 3x3x3 and 4x4x4 And this was the solution: |dw:1399050975413:dw| |dw:1399051313125:dw|
Join our real-time social learning platform and learn together with your friends!