Magnificent 7

Logic Level 2

There are 7 7 precious dragon balls you'd like to put into the bags of any sizes. A bag can also be placed completely in another bag.

If every containing bag must have distinct prime number of balls, what will be the maximum number of bags you can use?


The answer is 4.

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

Let the set {} denote a bag.

Then the first bag will have 2 2 balls: { 2 } \{2\} .

The second bag contains the first bag plus 1 1 ball, having total of 3 3 balls: { 1 , { 2 } } \{1,\{2\}\} .

The third bag contains the second bag plus 2 2 balls, having total of 5 5 balls: { { 1 , { 2 } } , 2 } \{\{1,\{2\}\}, 2\} .

Finally, the fourth bag contains the third bag plus 2 2 balls, having total of 7 7 balls: { { { 1 , { 2 } } 2 } , 2 } \{\{\{1,\{2\}\}\, 2\}, 2\} .

Therefore, we can use up to 4 4 bags to contain distinct number of balls in every bag.

You are a dragon Ball z fan ?

Sabhrant Sachan - 4 years, 7 months ago

Log in to reply

Well, I was thinking about something with 7, and this came into my head.

And, yeah, I'm kind of Z fan though I prefer Naruto recently.

Worranat Pakornrat - 4 years, 7 months ago

Can you explain why 4 is the maximum? Given your need for "distinct", this problem reduces to counting the number of primes n \leq n . I think a more interesting variant would be to allow for duplicated prime values, and we then have to figure out the "optimal packing".

I've edited the problem to indicate that you can put bags within bags.

Calvin Lin Staff - 4 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...