Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
I have been assigned a challenge by a teacher, and would love to be able to do it. We were given 27 small wooden cubes, making a 3x3x3 cube. The challenge is to write a program in java to find all possible ways to make puzzle pieces out of this cube while having it still form a cube.
Requirments:
Each piece can contain 4, 5, or 6 cubes.
There must be 5 and only five pieces
All pieces must have at least 3 of their cubes visible on the outside.

Any tips will be greatly appreciated!! thanks!!
Posted
Comments
Foothill 26-Aug-13 20:06pm    
Well first off, you can't have a cube with 6 or 5 pieces as that wouldn't be a cube. Only 4 pieces works ;)
PIEBALDconsult 26-Aug-13 21:12pm    
Read the question again.
[no name] 26-Aug-13 20:33pm    
Here's a tip for you. Try something yourself. You will learn a lot that way rather than running to someone else to do your homework for you.
Sergey Alexandrovich Kryukov 26-Aug-13 22:21pm    
Best answer so far.
—SA
PIEBALDconsult 26-Aug-13 21:17pm    
0) I suggest starting by playing with actual cubes and see what you learn.
1) Rule three seems needless
2) There will be many solutions that are only reflections or rotations of other solutions, eliminating the duplicates may be the hard part
P.S. You must have really pissed off your teacher; this is not an easy problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900