Suppose you want to fill a 1 5 0 × 6 0 × 3 7 cuboid with 5 × 5 × 5 cubes. To calculate how many fit, you divide the two volumes:
5 × 5 × 5 3 7 × 6 0 × 1 5 0 = 2 6 6 4 .
You conclude that given optimal placement, 2664 of the cubes fit inside the cuboid. Is this correct?
Assume that all the faces of the cubes are in parallel with the faces of the cuboid.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If we drop the requirement of the cubes being parallel to the sides, we run into the notion of geometric packing problems. For example, the square packing problem is: find the minimum size square needed to be able to fit x congruent squares in any configuration. Minimally packing 5 squares, for instance, does not use parallel sides:
Only a small set of square packings have been proven to be optimal. Even less is known about the cube packing case.
Not quite. Just because the cubes are parallel to the faces of the cuboid, doesn't necessarily mean that "in the maximum scenario, we must have everything in nice layers". It might be possible that there is some kind of displacement, and there may not be a clear definition of a "layer".
What other characteristics can we exploit to close this gap? Alternatively, how would we go about defining a layer unambiguously?
Log in to reply
Of course, I consciously avoided rigorous treatment. I am glad that you are interested.
Let me try. I'll come back as soon as I get one.
Log in to reply
Let's first formulate a way to ensure 'everything in nice layers'. Then we will think about rigorous definition of 'Layer'.
We can add the following conditions to ensure 'everything in nice layers'.
Condition- 1 : If a plane, that intersects a cube C 1 with the intersection set is a face of C 1 , intersects another cube C 2 , then the intersection set should be a face of C 2 .
Let me define a non-standard (but convenient in this case) personal term Guardian for the sake of convenience to state condition- 2 . The set of a pair of parallel planes is a Guardian to a cube if one of the planes fully contains a face of the cube and another fully contains the opposite face of that face of the cube. Thus, each cube has 3 guardians.
Condition- 2 : If two cubes C 1 and C 2 have 2 common guardians, then─ either there is another cube C 3 between the cubes C 1 and C 2 such that 2 of the guardians of C 3 is the 2 common guardians of C 1 and C 2 ; or C 1 and C 2 must touch each other face-to-face.
That is, there is no gap between them or the gap is fully filled by other cube.
Condition- 1 and 2 together with the need of maximization ensure to have everything in 'nice' layers.
Now, definition of 'Layer'. You might have already recognized that the above discussion of condition- 2 suggests the following definition of layer.
All the cubes sharing a common guardian that is perpendicular (means, each element of the guardian set is perpendicular) with the direction of the length (or breadth or height) of the cuboid, then these cubes form a Layer along the length (or breadth or height, respectively) of the cuboid.
Please, let me know what you think.
Log in to reply
@Muhammad Rasel Parvej – There is a much better way to show that we can have at most 2520 cubes.
It might be possible to argue via "layers". If I had to do it, I would carefully define each layer by "peeling off each bottom layer" then "peeling off each front layer", then "peeling off each side layer" to associate the cube to the corresponding triple ( a , b , c ) which represents which layer it is in.
(It's late here so I might just be tired / too lazy to think) Your argument feels wishy-washy to me, or at least hard to rigorize in the current way of "gaps" and "guardians"
Log in to reply
@Calvin Lin – I was trying to avoid introducing any coordinate system. Of course, I agree, introducing coordinate system would make it easier.
"at least hard to rigorize"─ I can't understand quite what is hard to regorize. I believe, 'Guardian' is okay with rigor. And the word 'gap' is not in the condition and definition statement.
Of course, introducing coordinate system would make it easier, concise. But I believe this version is not weaker.
it's true that with the condition "cubes are parallel to the faces of the cuboid" there's no requirement for them to be placed in neat "layers", but due to the shape of the cubes (all sides being of equal length) no variation in orientation will give you any advantage to packing then in different places within the cuboid. So even if for some sections you cause displacement in a "nice layer", to fulfill the requirements of the challenge (namely maximise the number of cubes you can fully place), it doesn't matter where the displacement is (top or bottom or varied in position, disrupting "nice layers") the volume of that displacement can't be combined to make space in a shape within which more cubes could be placed... could it?
The remaining volume (150 x 60 x 7 = 63000, divided by the volume of each cube 5 x 5 x 5 = 125) is 504. So theoretically, a maximum of 504 cubes could fit into that volume. If you array the cubes from diagonally opposite corners of the cuboid in regular "layers" consisting of one unit more along each of the three dimensional axes, does the space between the two tightly packed cube "pyramids" allow the placement of an additional plane of cubes?
I don't think so, because the "extra" space is only in one dimension, not two. so even when you pack in the way to maximise the space "left over", there still isn't enough gap to pack a cube.
Sadly, I don't know the math equations or techniques to prove my reasoned theory. Anyone else want to take a stab at it?
Log in to reply
It is true that we can only pack ⌊ n a ⌋ × ⌊ n b ⌋ × ⌊ n c ⌋ cubes of size n × n × into a a × b × c cuboid, subject to the condition that the faces are parallel.
See my solution for how we can generalize this problem for the case when there is extra space in all dimensions.
But if l x w x h is volume...and the given equation shows the division of volume into the boxes volume...then it is correct because the goven volume....oh, but the volume has a distinct shape
You have a typo in the first 37/5 equation.
The other solutions claim (non-rigorously) that we can only fit 2520 cubes. Here is a proof of the fact, which requires that "faces of cubes are parallel to the sides". After reading the solution, try and figure out where this is used.
Align the cuboid with one corner at ( 0 , 0 , 0 ) and the other corner at ( 1 5 0 , 6 0 , 3 7 ) . Call each of the points ( 5 a , 5 b , 5 c ) with 1 ≤ a ≤ 3 0 , 1 ≤ b ≤ 1 2 , 1 ≤ c ≤ 7 , distinguished . There are 2520 distinguished points, and the idea is to associate each point to a cube.
It would be great if each cube only touches 1 distinguished point, but that clearly need not be true.
In fact, a cube could touch up to 8 points. In such a case, these correspond to the corners of the cube.
Now, if a cube touches multiple distinguished points, we will
associate
it to the largest point, ordered lexicographically (meaning look at the first coordinate, then the second, then the third).
Claim:
1. Every cube must touch at least one distinguished point.
2. The associated distinguished point to a cube is unique.
If the above 2 claims are true, then we have an injective mapping from the cubes to the distinguished points via the associated distinguished point of the cube, Since there are 2520 distinguished points, this tells us that there are at most 2520 cubes.
Note: The claims are left to the reader. They should seem almost obvious.
As a reminder, consider how "faces of cubes are parallel to the sides" is used in the argument.
If you're having difficulty convincing yourself rigorously, leave a comment.
Elegant Solution I must say.
So, first what you have to do is divide 150 by 5, and you get 30. Then you divide 60 by 5 and you get 12. Then you divide 37 by 5 and you get 7.4. So, this means that it is not correct because you can't cut a cube into 7.4.
The problem doesn't indicate that the cubes have to take up all the space. They just have to fit in the given space. So in a length of 37 there fit 7 cubes with a side of 5. That is the height. So you multiply height(7) x length(12) x width(30) in order to find the actual space(volume) that these cubes will take if they are put inside the cuboid since it is a different shape from a cube. The result is 2520 :)
So the legnth of the rectangle is 150, which is divisible by 5. Therefore, it can fit length wise. Also, the width is 60 which is also divisible by 5. It can also fit because its divisible by 5. However, 37 isn't so its a little under 37 cm. Its 35. Understand??
Actually this is a boring problems He volumes need to be equal so he answer is obvious when comparing both
The division result implies total occupation of the volume. But since the dimension 37 is not a multiple of 5, then it's Game Over immediately.
One of the sides length is 37. As 37 its not divisible by 5, the statment its wrong.
It can't be true because 37 isn't a multiple of 5. Therefore complete packing isn't possible, even though the total volume of the container equals the volume of 2664 5X5X5 cubes.
I tried to multiply each set of numbers by 5 so : 5×37=185), 5×150=750), 5×60=360)=1285 and tbat did not equal out to the # given 2664
Simply put, all the cubes must be able to fit perfectly next to one another from one side to the other side without any gaps or cutting. The dimensions of 60 units and 150 units are all factors of five, but the dimension of 37 units is not. Therefore, there is no possible method to fill in the entire cuboid without cutting some cubes down to size.
Fitting volume of cubes and the cuboid is not the all to be done,but all should be inserted. . For that all the faces should satisfy to face that plane. (150/5) (60/5) (37/5) . is the maximum no. of cubes that can be inserted.
Problem Loading...
Note Loading...
Set Loading...
As every cube must be completely inside the cuboid and of course, you won't break/deform any cube, there will be maximum ⌊ 5 1 5 0 ⌋ = 3 0 layers of cubes along the cuboid length, maximum ⌊ 5 6 0 ⌋ = 1 2 layers of cubes along the cuboid breadth and maximum ⌊ 5 3 7 ⌋ = 7 layers of cubes along the cuboid height.
So, the maximum number of cubes you can put into the cuboid
= ⌊ 5 1 5 0 ⌋ × ⌊ 5 6 0 ⌋ × ⌊ 5 3 7 ⌋
= 3 0 × 1 2 × 7
= 2 5 2 0 = 2 6 6 4 . ■