Ali Baba and the Forty Thieves

Logic Level 5

In a Parallel Universe, Alibaba is the leader of Forty Thieves. One day, the thieves found 100 golden coins. The Forty Thieves wanted 80 golden coins, but the greedy Alibaba just want to own all the treasure. So he said to the thieves that:

I will divide the treasure to 2 groups with a positive integer number of coins.
Then, I choose a random group and divide it into 2 other groups with a positive integer number of coins.
I will continue this until there are 100 groups in total.
At any time of this process, If you can find 40 groups with a total of exactly 80 coins, then you can take this.
But if you cannot, you get nothing.

The thieves definitely can take 40 groups like that after a-th divide times whatever how Alibaba divide. What is the smallest of the value of a?


The answer is 59.

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.

5 solutions

Wang Xingyu
May 17, 2019

The topic is missing some helpful premises including each group must have 1 coin .
The range of a is from 0 to 99.
When a is 39, there're 40 groups which having the sum is 100 coins.
When a is 99, there're 100 groups which having the sum is 100 coins, more importantly, each group has only 1 coin.
We can notice that whatever how Alibaba divide, the group which has only 1 coin will definitely appear when a is 50 and the total number of group is 51.
And when a is 59, there're 60 groups in total which at least have 20 groups with only 1 coin. This condition is exactly what we are looking forward to, with other 40 groups which having the sum is 80 coins.
So the smallest value of a is 59.


Charlz Charlizard
Dec 26, 2019

Okay! I imagine yourself at the position of Alibaba. You do not want to divide in such a way that it will give the 40 thief advantage. Also you know that if you keep on dividing with the scheme you proposed in the question, the thief will eventually claim their reward. SO the best strategy is to prolong the condition that makes the total of 40 groups to 80 coins. This strategy can only be applied if the condition-- [summations of coins in 39 groups with any split in amount should be minimum] which will prolong the time to get to the split.

So now it is clearly visible that if we split like 1 coin in each group it meets the criterion for above mentioned strategy.

Now let's say you reached 39th division with 1 coin each.You will have total of 40 groups with (39,1) and (1,61). So in order to have 80 coins one needs 41 coins in 1 other group. Now we already have 61 coins left in one group. So we can do 61 - 41 = 20 more splits.

So here we see that the total number of splits = 39 + 20 = 59 which is the required solution to this problem!

Ryan S
Jul 6, 2019

I imagined a stack of the final 100 groups. Each ‘undivide’ combines two into a single row that would fall past any smaller ones. The bottom 40 make up your collection. Here, you can easily prove that any merging before you reach your goal adds 1 to your collection knowing that every row in your set must have at least 2 before an outside row can have 2. You need 40 ‘undivides’.
99-40=59

Can u explain a little more

Krish Yadav - 1 year, 11 months ago
Dmitriy Khripkov
Jun 8, 2019

Suppose Alibaba splits off just a single coin from the pile at each divide, so that after 58 steps there remains one pile of size 42 and 58 piles of size 1. Cleary at no point in this process does a group of 40 total to 80. Therefore a > 58 a>58 .

Now suppose we have an arbitrary division of the coins into 60 piles (taking a=59). Let #(1) denote the number of piles of size 1. If #(1) \ge 20 then we're done, as the other 40 piles necessarily sum to 80. But for #(1) to be \le 19 there must be more than 100 coins, as t o t a l 19 + 41 2 = 101 total \ge 19+41\cdot2 = 101 .

Vu Van Luan
May 26, 2019

Consider the time we have 60 groups. Let x is the number of group that contain 1 coin. So there are 60-a groups having at least 2 coin in each group. Because the total number of coin is 100 coins, so we have inequation: x + 2(60-x) <= 100 20 <= x. So at the time we have 60 groups, we have at least 20 groups contain 1 coin. So we chose 40 groups, leaving 20 groups which contain a coin. The 40 groups we chose having total 80 coin.

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...