Fill The Bags

Logic Level 1

Jenny has 2 bags, each of which can hold at most 10 kg. If she has the 6 items seen above, what is the most weight (in kg) she can pack?

Note: The bags have to remain separate (you can't put one bag in another bag).

17 18 19 20

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.

1 solution

Kay Xspre
Mar 21, 2016

Let the two bags are denoted by set A A and B B , where the sum of its member is at 10 the maximum.

Since there are two 6kg items, to maximize it, we have to first pick them into different bags, which means A = { 6 } A = \{6\} and B = { 6 } B = \{6\} . This will leave the remaining bag to contains space for 4kg each, precluding the possibility to select a 5kg items. Since the remaining items is at 1kg, 2kg and 4kg, we can split them into to bags as A = { 6 , 2 , 1 } A = \{6, 2, 1\} and B = { 6 , 4 } B = \{6, 4\} (the bag may be swapped). As they are both less than 10kg for each bag, this produces the maximum weight of 19kg for both bags combined.


It is noted that this solution omits the possibility of selecting 6kg and 5kg into different bags (or A = { 6 } A = \{6\} and B = { 5 } B = \{5\} ). If we follow this approach, another 6kg items cannot be fitted into any bag, and although we can put a 1kg, 2kg and 4kg into the bag (with various combination, such as A = { 6 , 1 , 2 } A = \{6, 1, 2\} and B = { 5 , 4 } B = \{5, 4\} or A = { 6 , 4 } A = \{6, 4\} and B = { 5 , 1 , 2 } B = \{5, 1, 2\} ), its sum will be 18kg combined, less than the solution above.

You should be explicit about why you "have to pick the 6kg" for each bag. In theory, it could be better to exclude one (or both) of them...e.g., if the weights were (6,6,5,5,5,5).

Eli Ross Staff - 5 years, 2 months ago

Log in to reply

@Calvin Lin , @Eli Ross [a solution has been edited to be more explicit, and I removed them here]

I am, however, is of the view that in [Eli's latter] scenario, it may be necessary to sacrifice an extra weight in a box to add more boxes, which depends on conditions provided.

Kay Xspre - 5 years, 2 months ago

Log in to reply

Great! Could you add that explanation into the solution? You can edit it directly by hitting the Edit button.

Calvin Lin Staff - 5 years, 2 months ago

By a common sense the answer is 19... But if we take two bag together (one is inside another) should the total limit be 20?

Tran Hieu - 5 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...