Will you be able to save yourself?

A pirate captures you and your ship, hands you 4095 4095 identical balls and 12 12 bags. The pirate says, "Arrange these balls in these bags however you like, but soon you will be required to give a specific number of balls(by handing over some bag or bags), and you cannot change the number of balls in any of the bags once you have arranged them all. If you are able to do so, your ship will be given back to you and you will be freed! But, if you are unsuccessful, you will be thrown in the water!"

Can you fulfill this demand for any positive integer n n less than or equal to 4095 4095 and save you, your companions and your precious ship?

Yes No

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.

2 solutions

We need to fill every bag with a distinct power of 2 2 number of balls.

2 0 + 2 1 + 2 2 + 2 3 + + 2 9 + 2 10 + 2 11 12 bags = 1 + 2 + 4 + 8 + + 512 + 1024 + 2048 12 bags = 4095 \underbrace{2^0+2^1+2^2+2^3+ \dots + 2^9+2^{10}+2^{11}}_\text{12 bags} =\underbrace{1+2+4+8+\dots+512+1024+2048}_\text{12 bags} = 4095 balls, using all of them!

When the pirate asks us for a number of balls, you have to express this number in binary number system (base 2) and give them the bags that correspond to the right powers of 2 2 .

So, we can save ourselves from this evil yet clever pirate!

Pradeep Tripathi
May 14, 2020

We can convert any natural number into its binary equivalent using a specific string of 0s and 1s.

Below are some examples:-

          1037 = 10000001101;           2020 = 11111100100;             4040=111111001000                 ...

At first, the wicked captain wants us to hand him over any random number of coins. As, every coin has same value, we can say that the number of coins given to him is proportional to total price. So, one of the best approach is to distribute the coins in a binary way( 2^0,2^1,2^2...2^11) in bags.

By this way, this situation would be then resembled into binary and decimal numbers. In this resemblance, the bags given to the pirate represent 1 and the remaining bags will be 0.

So, we ought to surprise the pirate by this shrewdness and our ship and crew members would be back to us soon!

Note: Could someone explain me how to use Latex? Please help me so to make others' attracted to my solution.

In latex you need to use this http://s1.daumcdn.net/editor/fp/service nc/pencil/Pencil chromestore.html when you are done typing the equation put it in the brackets that latex is surounded with

Joshua Olayanju - 1 year ago

Log in to reply

Hey, you deceived me! The AI says that URL is not in the server. (Error 404)

Please give me correct information about Latex.

Pradeep Tripathi - 1 year ago

@Pradeep Tripathi @Vinayak Srivastava - Are you guys commenting and then deleting, coz I have like 6-8 notifications from this problem, yet there is not a single comment here :)

A Former Brilliant Member - 10 months, 1 week ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...