Pack boxes with different size inside a large box












0












$begingroup$


Suppose there are 3 sizes of boxes:




  • 10cm x 10cm x 10cm

  • 20cm x 20cm x 20cm

  • 10cm x 15cm x 4cm


and I have boxes of dimensions 20 x a, 10 x c and 30 x b. How many boxes of 200 x 200 x 100cm do I need to pack them all?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    "I have boxes of dimensions 20 x a, 10 x c and 30 x b" : I don't get that part. Do you mean you have 20 boxes of type a, 30 of type b and 10 of type c ?
    $endgroup$
    – Evargalo
    Jun 22 '17 at 16:14








  • 1




    $begingroup$
    1 box will give you plenty enough room!
    $endgroup$
    – Bram28
    Jun 22 '17 at 16:43










  • $begingroup$
    @Evargalo yes correct.
    $endgroup$
    – Ansary Ans21
    Jun 22 '17 at 23:58
















0












$begingroup$


Suppose there are 3 sizes of boxes:




  • 10cm x 10cm x 10cm

  • 20cm x 20cm x 20cm

  • 10cm x 15cm x 4cm


and I have boxes of dimensions 20 x a, 10 x c and 30 x b. How many boxes of 200 x 200 x 100cm do I need to pack them all?










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    "I have boxes of dimensions 20 x a, 10 x c and 30 x b" : I don't get that part. Do you mean you have 20 boxes of type a, 30 of type b and 10 of type c ?
    $endgroup$
    – Evargalo
    Jun 22 '17 at 16:14








  • 1




    $begingroup$
    1 box will give you plenty enough room!
    $endgroup$
    – Bram28
    Jun 22 '17 at 16:43










  • $begingroup$
    @Evargalo yes correct.
    $endgroup$
    – Ansary Ans21
    Jun 22 '17 at 23:58














0












0








0





$begingroup$


Suppose there are 3 sizes of boxes:




  • 10cm x 10cm x 10cm

  • 20cm x 20cm x 20cm

  • 10cm x 15cm x 4cm


and I have boxes of dimensions 20 x a, 10 x c and 30 x b. How many boxes of 200 x 200 x 100cm do I need to pack them all?










share|cite|improve this question











$endgroup$




Suppose there are 3 sizes of boxes:




  • 10cm x 10cm x 10cm

  • 20cm x 20cm x 20cm

  • 10cm x 15cm x 4cm


and I have boxes of dimensions 20 x a, 10 x c and 30 x b. How many boxes of 200 x 200 x 100cm do I need to pack them all?







rectangles packing-problem






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 13 at 15:03









quid

37.1k95093




37.1k95093










asked Jun 22 '17 at 16:04









Ansary Ans21Ansary Ans21

1012




1012








  • 1




    $begingroup$
    "I have boxes of dimensions 20 x a, 10 x c and 30 x b" : I don't get that part. Do you mean you have 20 boxes of type a, 30 of type b and 10 of type c ?
    $endgroup$
    – Evargalo
    Jun 22 '17 at 16:14








  • 1




    $begingroup$
    1 box will give you plenty enough room!
    $endgroup$
    – Bram28
    Jun 22 '17 at 16:43










  • $begingroup$
    @Evargalo yes correct.
    $endgroup$
    – Ansary Ans21
    Jun 22 '17 at 23:58














  • 1




    $begingroup$
    "I have boxes of dimensions 20 x a, 10 x c and 30 x b" : I don't get that part. Do you mean you have 20 boxes of type a, 30 of type b and 10 of type c ?
    $endgroup$
    – Evargalo
    Jun 22 '17 at 16:14








  • 1




    $begingroup$
    1 box will give you plenty enough room!
    $endgroup$
    – Bram28
    Jun 22 '17 at 16:43










  • $begingroup$
    @Evargalo yes correct.
    $endgroup$
    – Ansary Ans21
    Jun 22 '17 at 23:58








1




1




$begingroup$
"I have boxes of dimensions 20 x a, 10 x c and 30 x b" : I don't get that part. Do you mean you have 20 boxes of type a, 30 of type b and 10 of type c ?
$endgroup$
– Evargalo
Jun 22 '17 at 16:14






$begingroup$
"I have boxes of dimensions 20 x a, 10 x c and 30 x b" : I don't get that part. Do you mean you have 20 boxes of type a, 30 of type b and 10 of type c ?
$endgroup$
– Evargalo
Jun 22 '17 at 16:14






1




1




$begingroup$
1 box will give you plenty enough room!
$endgroup$
– Bram28
Jun 22 '17 at 16:43




$begingroup$
1 box will give you plenty enough room!
$endgroup$
– Bram28
Jun 22 '17 at 16:43












$begingroup$
@Evargalo yes correct.
$endgroup$
– Ansary Ans21
Jun 22 '17 at 23:58




$begingroup$
@Evargalo yes correct.
$endgroup$
– Ansary Ans21
Jun 22 '17 at 23:58










1 Answer
1






active

oldest

votes


















1












$begingroup$

$1$ box will be far more than enough! To see this, let's pack even more boxes, let's say a nice even:



$100$ of type $a$: $10*10*10$



$50$ of type $b$: $20*20*20$



$100$ of type $c$: $10*15*4$



Now, the $100$ boxes of type $a$ can be packed in a square of $10$ by $10$ of such boxes, giving you a layer of $100*100*10$



The $50$ boxes of type $b$ can be packed by putting them into two $5x5$ squares, thus giving $2$ layers of $100*100*20$, for a total of $100*100*40$



Finally, the $100$ boxed of type $$c are all smaller in every dimension than those of type $b$, so let's just pack 100 more boxes of type b: if we can do that, we can certainly pack $100$ boxes of type $c$.



Well, if we pack $100$ more boxes of type $b$ the same was as the earlier $50$ boxes, then it would take us an additional $100*100*80$ of space.



So, stack all these layers, and you get $100*100*130$, which easily fits into a single $100*100*200$ box. (indeed, a $100*100*100$ box will be just fine, giving that the boxes of type $c$ can be packed with a height of $4$ instead of $20$, so they would only take up $100*100*16$, for a total of $100*100*66$)



Plenty of space!!






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Yeah it works. Say I am replacing the 200x200x100 box with a 60x60x30 box. So how many boxes of 60x60x30 do I need to pack them all? Thank you for the above answer!
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:30












  • $begingroup$
    Is there any common formula to solve such problems?
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:41










  • $begingroup$
    @AnsaryAns21 Well, I'm no expert in packing problems ... I just try to create nice layers! :). for example, for your 60*60*30 box I would first make a layer of 9 type b boxes in a 3x3 square, so that creates a layer of 60x60x20. Then I'll put together some type c boxes: I can nicely fit their length 4 times into the 60, so I 'll create a 60*8*10 rectangle with 8 pf them. Also, 18 of the type a boxes in a 3x6 patterns takes up 60x30x10, so that leaves me with 60x22x10: plenty to pack the last 2 c boxes and the last two a boxes. So that's the first box. Now I have 21 b boxes left. .. (Continued)
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:12










  • $begingroup$
    Since I already figures out that I can at best get 9 boxes of type b into a 60x60x30 box, it will take me 3 more bix boxes .. So I need 4 big boxes in that case.
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:13











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2332554%2fpack-boxes-with-different-size-inside-a-large-box%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

$1$ box will be far more than enough! To see this, let's pack even more boxes, let's say a nice even:



$100$ of type $a$: $10*10*10$



$50$ of type $b$: $20*20*20$



$100$ of type $c$: $10*15*4$



Now, the $100$ boxes of type $a$ can be packed in a square of $10$ by $10$ of such boxes, giving you a layer of $100*100*10$



The $50$ boxes of type $b$ can be packed by putting them into two $5x5$ squares, thus giving $2$ layers of $100*100*20$, for a total of $100*100*40$



Finally, the $100$ boxed of type $$c are all smaller in every dimension than those of type $b$, so let's just pack 100 more boxes of type b: if we can do that, we can certainly pack $100$ boxes of type $c$.



Well, if we pack $100$ more boxes of type $b$ the same was as the earlier $50$ boxes, then it would take us an additional $100*100*80$ of space.



So, stack all these layers, and you get $100*100*130$, which easily fits into a single $100*100*200$ box. (indeed, a $100*100*100$ box will be just fine, giving that the boxes of type $c$ can be packed with a height of $4$ instead of $20$, so they would only take up $100*100*16$, for a total of $100*100*66$)



Plenty of space!!






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Yeah it works. Say I am replacing the 200x200x100 box with a 60x60x30 box. So how many boxes of 60x60x30 do I need to pack them all? Thank you for the above answer!
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:30












  • $begingroup$
    Is there any common formula to solve such problems?
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:41










  • $begingroup$
    @AnsaryAns21 Well, I'm no expert in packing problems ... I just try to create nice layers! :). for example, for your 60*60*30 box I would first make a layer of 9 type b boxes in a 3x3 square, so that creates a layer of 60x60x20. Then I'll put together some type c boxes: I can nicely fit their length 4 times into the 60, so I 'll create a 60*8*10 rectangle with 8 pf them. Also, 18 of the type a boxes in a 3x6 patterns takes up 60x30x10, so that leaves me with 60x22x10: plenty to pack the last 2 c boxes and the last two a boxes. So that's the first box. Now I have 21 b boxes left. .. (Continued)
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:12










  • $begingroup$
    Since I already figures out that I can at best get 9 boxes of type b into a 60x60x30 box, it will take me 3 more bix boxes .. So I need 4 big boxes in that case.
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:13
















1












$begingroup$

$1$ box will be far more than enough! To see this, let's pack even more boxes, let's say a nice even:



$100$ of type $a$: $10*10*10$



$50$ of type $b$: $20*20*20$



$100$ of type $c$: $10*15*4$



Now, the $100$ boxes of type $a$ can be packed in a square of $10$ by $10$ of such boxes, giving you a layer of $100*100*10$



The $50$ boxes of type $b$ can be packed by putting them into two $5x5$ squares, thus giving $2$ layers of $100*100*20$, for a total of $100*100*40$



Finally, the $100$ boxed of type $$c are all smaller in every dimension than those of type $b$, so let's just pack 100 more boxes of type b: if we can do that, we can certainly pack $100$ boxes of type $c$.



Well, if we pack $100$ more boxes of type $b$ the same was as the earlier $50$ boxes, then it would take us an additional $100*100*80$ of space.



So, stack all these layers, and you get $100*100*130$, which easily fits into a single $100*100*200$ box. (indeed, a $100*100*100$ box will be just fine, giving that the boxes of type $c$ can be packed with a height of $4$ instead of $20$, so they would only take up $100*100*16$, for a total of $100*100*66$)



Plenty of space!!






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Yeah it works. Say I am replacing the 200x200x100 box with a 60x60x30 box. So how many boxes of 60x60x30 do I need to pack them all? Thank you for the above answer!
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:30












  • $begingroup$
    Is there any common formula to solve such problems?
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:41










  • $begingroup$
    @AnsaryAns21 Well, I'm no expert in packing problems ... I just try to create nice layers! :). for example, for your 60*60*30 box I would first make a layer of 9 type b boxes in a 3x3 square, so that creates a layer of 60x60x20. Then I'll put together some type c boxes: I can nicely fit their length 4 times into the 60, so I 'll create a 60*8*10 rectangle with 8 pf them. Also, 18 of the type a boxes in a 3x6 patterns takes up 60x30x10, so that leaves me with 60x22x10: plenty to pack the last 2 c boxes and the last two a boxes. So that's the first box. Now I have 21 b boxes left. .. (Continued)
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:12










  • $begingroup$
    Since I already figures out that I can at best get 9 boxes of type b into a 60x60x30 box, it will take me 3 more bix boxes .. So I need 4 big boxes in that case.
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:13














1












1








1





$begingroup$

$1$ box will be far more than enough! To see this, let's pack even more boxes, let's say a nice even:



$100$ of type $a$: $10*10*10$



$50$ of type $b$: $20*20*20$



$100$ of type $c$: $10*15*4$



Now, the $100$ boxes of type $a$ can be packed in a square of $10$ by $10$ of such boxes, giving you a layer of $100*100*10$



The $50$ boxes of type $b$ can be packed by putting them into two $5x5$ squares, thus giving $2$ layers of $100*100*20$, for a total of $100*100*40$



Finally, the $100$ boxed of type $$c are all smaller in every dimension than those of type $b$, so let's just pack 100 more boxes of type b: if we can do that, we can certainly pack $100$ boxes of type $c$.



Well, if we pack $100$ more boxes of type $b$ the same was as the earlier $50$ boxes, then it would take us an additional $100*100*80$ of space.



So, stack all these layers, and you get $100*100*130$, which easily fits into a single $100*100*200$ box. (indeed, a $100*100*100$ box will be just fine, giving that the boxes of type $c$ can be packed with a height of $4$ instead of $20$, so they would only take up $100*100*16$, for a total of $100*100*66$)



Plenty of space!!






share|cite|improve this answer









$endgroup$



$1$ box will be far more than enough! To see this, let's pack even more boxes, let's say a nice even:



$100$ of type $a$: $10*10*10$



$50$ of type $b$: $20*20*20$



$100$ of type $c$: $10*15*4$



Now, the $100$ boxes of type $a$ can be packed in a square of $10$ by $10$ of such boxes, giving you a layer of $100*100*10$



The $50$ boxes of type $b$ can be packed by putting them into two $5x5$ squares, thus giving $2$ layers of $100*100*20$, for a total of $100*100*40$



Finally, the $100$ boxed of type $$c are all smaller in every dimension than those of type $b$, so let's just pack 100 more boxes of type b: if we can do that, we can certainly pack $100$ boxes of type $c$.



Well, if we pack $100$ more boxes of type $b$ the same was as the earlier $50$ boxes, then it would take us an additional $100*100*80$ of space.



So, stack all these layers, and you get $100*100*130$, which easily fits into a single $100*100*200$ box. (indeed, a $100*100*100$ box will be just fine, giving that the boxes of type $c$ can be packed with a height of $4$ instead of $20$, so they would only take up $100*100*16$, for a total of $100*100*66$)



Plenty of space!!







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jun 22 '17 at 16:52









Bram28Bram28

62.3k44793




62.3k44793












  • $begingroup$
    Yeah it works. Say I am replacing the 200x200x100 box with a 60x60x30 box. So how many boxes of 60x60x30 do I need to pack them all? Thank you for the above answer!
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:30












  • $begingroup$
    Is there any common formula to solve such problems?
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:41










  • $begingroup$
    @AnsaryAns21 Well, I'm no expert in packing problems ... I just try to create nice layers! :). for example, for your 60*60*30 box I would first make a layer of 9 type b boxes in a 3x3 square, so that creates a layer of 60x60x20. Then I'll put together some type c boxes: I can nicely fit their length 4 times into the 60, so I 'll create a 60*8*10 rectangle with 8 pf them. Also, 18 of the type a boxes in a 3x6 patterns takes up 60x30x10, so that leaves me with 60x22x10: plenty to pack the last 2 c boxes and the last two a boxes. So that's the first box. Now I have 21 b boxes left. .. (Continued)
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:12










  • $begingroup$
    Since I already figures out that I can at best get 9 boxes of type b into a 60x60x30 box, it will take me 3 more bix boxes .. So I need 4 big boxes in that case.
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:13


















  • $begingroup$
    Yeah it works. Say I am replacing the 200x200x100 box with a 60x60x30 box. So how many boxes of 60x60x30 do I need to pack them all? Thank you for the above answer!
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:30












  • $begingroup$
    Is there any common formula to solve such problems?
    $endgroup$
    – Ansary Ans21
    Jun 23 '17 at 0:41










  • $begingroup$
    @AnsaryAns21 Well, I'm no expert in packing problems ... I just try to create nice layers! :). for example, for your 60*60*30 box I would first make a layer of 9 type b boxes in a 3x3 square, so that creates a layer of 60x60x20. Then I'll put together some type c boxes: I can nicely fit their length 4 times into the 60, so I 'll create a 60*8*10 rectangle with 8 pf them. Also, 18 of the type a boxes in a 3x6 patterns takes up 60x30x10, so that leaves me with 60x22x10: plenty to pack the last 2 c boxes and the last two a boxes. So that's the first box. Now I have 21 b boxes left. .. (Continued)
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:12










  • $begingroup$
    Since I already figures out that I can at best get 9 boxes of type b into a 60x60x30 box, it will take me 3 more bix boxes .. So I need 4 big boxes in that case.
    $endgroup$
    – Bram28
    Jun 23 '17 at 1:13
















$begingroup$
Yeah it works. Say I am replacing the 200x200x100 box with a 60x60x30 box. So how many boxes of 60x60x30 do I need to pack them all? Thank you for the above answer!
$endgroup$
– Ansary Ans21
Jun 23 '17 at 0:30






$begingroup$
Yeah it works. Say I am replacing the 200x200x100 box with a 60x60x30 box. So how many boxes of 60x60x30 do I need to pack them all? Thank you for the above answer!
$endgroup$
– Ansary Ans21
Jun 23 '17 at 0:30














$begingroup$
Is there any common formula to solve such problems?
$endgroup$
– Ansary Ans21
Jun 23 '17 at 0:41




$begingroup$
Is there any common formula to solve such problems?
$endgroup$
– Ansary Ans21
Jun 23 '17 at 0:41












$begingroup$
@AnsaryAns21 Well, I'm no expert in packing problems ... I just try to create nice layers! :). for example, for your 60*60*30 box I would first make a layer of 9 type b boxes in a 3x3 square, so that creates a layer of 60x60x20. Then I'll put together some type c boxes: I can nicely fit their length 4 times into the 60, so I 'll create a 60*8*10 rectangle with 8 pf them. Also, 18 of the type a boxes in a 3x6 patterns takes up 60x30x10, so that leaves me with 60x22x10: plenty to pack the last 2 c boxes and the last two a boxes. So that's the first box. Now I have 21 b boxes left. .. (Continued)
$endgroup$
– Bram28
Jun 23 '17 at 1:12




$begingroup$
@AnsaryAns21 Well, I'm no expert in packing problems ... I just try to create nice layers! :). for example, for your 60*60*30 box I would first make a layer of 9 type b boxes in a 3x3 square, so that creates a layer of 60x60x20. Then I'll put together some type c boxes: I can nicely fit their length 4 times into the 60, so I 'll create a 60*8*10 rectangle with 8 pf them. Also, 18 of the type a boxes in a 3x6 patterns takes up 60x30x10, so that leaves me with 60x22x10: plenty to pack the last 2 c boxes and the last two a boxes. So that's the first box. Now I have 21 b boxes left. .. (Continued)
$endgroup$
– Bram28
Jun 23 '17 at 1:12












$begingroup$
Since I already figures out that I can at best get 9 boxes of type b into a 60x60x30 box, it will take me 3 more bix boxes .. So I need 4 big boxes in that case.
$endgroup$
– Bram28
Jun 23 '17 at 1:13




$begingroup$
Since I already figures out that I can at best get 9 boxes of type b into a 60x60x30 box, it will take me 3 more bix boxes .. So I need 4 big boxes in that case.
$endgroup$
– Bram28
Jun 23 '17 at 1:13


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2332554%2fpack-boxes-with-different-size-inside-a-large-box%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

How to fix TextFormField cause rebuild widget in Flutter