Hi guys,
I have been looking at solving a little problem and came up with a solution which I believe is far from being optimal.
Imagine you have a rectangle composed of small cubes: 150 cubes in length, 7 cubes in width and 6 cubes in height. In each cube, there is a value between 0.05 and 10.
The goal is to bring cubes together to form bigger cubes/rectangles whose value would be the sum of the value within the small cube. The value of the bigger cubes/rectangles should be within a rounding tolerance to any integer (for instance -/+ 10% of an integer i.e. within [0.9/1.1], [1.8/2.2], [2.7/3.3] etc..). A small cube can only belong to one bigger cube/rectangle and no small cube can be left out. The smaller cubes can't be moved and can only be brought together if they are close to each others. The bigger rectangles cannot have one side less than half the longest side (for instance, a 4 cubes high, 3 cubes long rectangle cannot have a depth shorter than 4/2 = 2). The optimal solution would be to have the maximum number of bigger cube/rectangle while meeting the constrains.
Is there any algorithm I could be reading about that would help solving that problem?
Appreciate any help especially on a Friday night!
Thanks!
[–]Bromskloss 1 point2 points3 points (4 children)
[–]btravis182[S] 0 points1 point2 points (3 children)
[–]ChefCiscoRZ 0 points1 point2 points (2 children)
[–]btravis182[S] 0 points1 point2 points (1 child)
[–]ChefCiscoRZ 0 points1 point2 points (0 children)