Posts

Showing posts with the label distribution

Story of Distiribution of 100 Coins Loot

Five ship’s pirates have obtained 100 gold coins and have to divide up the loot. The pirates are all extremely intelligent, treacherous and selfish (especially the captain).

The captain always proposes a distribution of the loot. All pirates vote on the proposal, and if half the crew or more go “Aye”, the loot is divided as proposed, as no pirate would be willing to take on the captain without superior force on their side.

If the captain fails to obtain support of at least half his crew (which includes himself), he faces a mutiny, and all pirates will turn against him and make him walk the plank. The pirates start over again with the next senior pirate as captain.




5 Pirates and 100 Gold Coins

What is the maximum number of coins the captain can keep without risking his life?


He can take away 98 coins! How? Read here! 


The Captain's Undeniable Proposal


What was the situation?  

He can keep 98 coins! Surprised? Read how.




Let's number 5 pirates as Pirate 5, Pirate 4.....Pirate 1 as per their descending order of seniority.

Pirate 5 keeps 98 coins with him and gives 1 coin each to Pirate 3 and Pirate 1.

Now Pirate 5 i.e Captain explains his decision -

CASE 1:


 If there were only 2 pirates then Pirate 2 would have taken all 100 coins after obtaining his own vote which accounts to 50% votes (50 % of 2 = 1).

CASE 2: 


 In case of 3 pirates, the Pirate 3 would have offered 1 coin to Pirate 1 & would have kept 99 coins with him. Now Pirate 1 wouldn't have any option other than agreeing on deal with Pirate 3. That's because if he doesn't agree then Pirate 3 would be eliminated & all coins would be with Pirate 2 as explained in above (case 1) of only 2 pirates. So votes of Pirate 1 and Pirate 3 which account to 66% (2 out of 3) votes of group locks this deal and Pirate 2 would be left without any coin.

CASE 3: 


 Now in case of 4 pirates, Pirate 4 would offer coin to Pirate 2 & would keep 99 coins with him. Now, Pirate 2 know what happens if Pirate 4 gets eliminated. Pirate 3 would offer 1 coin to Pirate 1 & will take away 99 coins. So Pirate 2 would definitely accept this deal. That's how votes of Pirate 4 and Pirate 2 makes 50% (2 out of 4) votes of group to pass the proposal. Pirate 3 and Pirate 1 can't do anything in this case.

By now, Pirate 3 and Pirate 1 realizes what happens of Pirate 5 gets eliminated. They won't be getting any coin if Pirate 4 becomes captain as explained above (case 3). So they have no option other than to vote for the proposal of Pirate 5. 


This way, Pirate 5, Pirate 3 and Pirate 1 (3/5 = 60% of crew) agree on proposal of Pirate 5 where he takes away 98 coins with 1 coin each to Pirate 3 and Pirate 1. 

Challenge of Father to Son

A man told his son that he would give him $1000 if he could accomplish the following task. 

The father gave his son ten envelopes and a thousand dollars, all in one dollar bills. He told his son, "Place the money in the envelopes in such a manner that no matter what number of dollars I ask for, you can give me one or more of the envelopes, containing the exact amount I asked for without having to open any of the envelopes. If you can do this, you will keep the $1000."

When the father asked for a sum of money, the son was able to give him envelopes containing the exact amount of money asked for. 

How did the son distribute the money among the ten envelopes?

Challenge of Father to Son


THIS is how son accepts the challenge!

Son's Response to the Father's Challenge


What was the challenge?

For a moment, let's suppose father had given $30 to son and provided 5 envelopes and put the same challenge.
----------------------------------------------------------------------------------------------------
Here, use of the binary number system helps in matter.

The son would distribute 15 dollars into 4 envelops like - 

2^0 = 1, 2^1 = 2, 2^2 = 4, 2^3 = 8.


Now, for any amount asked between 1 to 15, son can produce some of these 4 envelops wherever 1 is there in envelop column for that particular amount.

For example, if father asks for $10 (Binary - 1010), son would give envelop 4 and 2 (8+2=10).

After putting $15 dollar in 4 envelops, he puts remaining $15 in 5th envelop so that he can cover rest of amount between 16 to 30.

If father asks amount greater than 15 then he would take envelop of $15 first and depending on how much the amount asked is greater than this $15 he would pick some of those 4 envelops.

For example, if father asks for $24, then he picks envelop 5 having $15 and envelops for amount 24 - 15 = 9 (Binary - 1009) i.e. envelop 4 and 1 (8+1=9)  i.e. total of 15 + 9 = 24.

So, what we observe from this is that the number of envelops needed for such arrangement is equal to the number of binary bits needed to represent the amount itself or nearest power of 2 greater than the amount.

In above case, to represent 30 in binary we need 5 bits or nearest power of 2 greater than 30 is 32 which needs 5 bits for representation.

-----------------------------------------------------------------------------

Now, let's turn to the actual challenge where father has asked son to distribute $1000 rightly in 10 envelopes. 

The reason for selecting 10 as a number of envelops is clear now as 1000 needs 10 bits in binary or nearest power of 2 greater than 1000 is 1024 which needs 10 bits for binary representation.

So, the son puts 256, 128, 64, 32, 16, 8, 4, 2, 1 dollars in 9 envelops (envelop numbered as Envelop 9, Envelop 8.........Envelop 1 in order)
 and 1000 - 511 = 489 dollars in 10th envelop.

First 9 envelops will cover amounts from 1 to 511 and for amounts greater than 511 inclusion of 10th envelop having 489 dollars is mandatory.

Again selection of envelops for the amount 511 to 1000 depends on how much the amount exceeds the $489. The binary representation of that difference and selection of envelop accordingly is all that needed.
 
----------------------------------------------------------------------------------------------------

Let's make sure this distribution with couple of examples.

If father asks for amount of $109 (binary - 1101101) then son picks 

Envelop 1($1) + Envelop 3 ($4) + Envelop 4 ($8) + Envelop 6 ($32) + 
Envelop 7 ($64) i.e. having amount = 1 + 4 + 8 + 32 + 64 = 109 dollars.

If father asks for $525 then son gives $489 via Envelop 10 and rest of amount 
530 - 489 = 40 (Binary - 101000) in form of Envelop - 6 ($32) and Envelop 4 ($8).   

----------------------------------------------------------------------------------------------------
 

Fair Distribution Of Water

In Sahara desert , 3 men found a big 24L Jar is full of water. Since there is shortage of water so they decided to distribute the water among themselves such that they all have equal amounts of it. But they only have a 13L, a 5L and an 11 liter Jar.

How do they do it? 


Challenge of Fair Distribution Of Water -  - Logical Puzzle

Here is how to do it!

Source 

Equal Distribution Of Water


What was the challenge?

1. First pour 24L into 13L and 11L jar.There will be no water in 24L jar.

2. Now pour 13L jar into 5L jar till 5L is filled. So 8L of water will be left in 13L jar.

3. This 8L of water from 13L jar is emptied in empty 24L jar.This will leave 13L jar empty.

4. Now pour 11L water from 11L jar into 13L of jar. There is still space for 2L of water in 13L jar.

5. Pour 5L jar into 13L of jar which had space for 2L only. So 3L of water will be left in 5L of jar.

6. This 3L of water is emptied in 11L jar.

7. A 13L jar full of water is again poured into 5L jar leaving behind 8L of water in it.

8. A 5L jar full of water is finally poured in 11L jar already having 3L of water. 

9. This way, 24L, 11L and 13L of jar would have 8L of water each.


Accepted Challenge of Equal Distribution Of Water - Logical Puzzle

The Coconut Problem

Ten people land on a deserted island. There they find lots of coconuts and a monkeys. During their first day they gather coconuts and put them all in a community pile. After working all day they decide to sleep and divide them into ten equal piles the next morning.

That night one castaway wakes up hungry and decides to take his share early. After dividing up the coconuts he finds he is one coconut short of ten equal piles. He also notices the monkey holding one more coconut. So he tries to take the monkey's coconut to have a total evenly divisible by 10. However when he tries to take it the monkey conks him on the head with it and kills him.

Later another castaway wakes up hungry and decides to take his share early. On the way to the coconuts he finds the body of the first castaway, which pleases him because he will now be entitled to 1/9 of the total pile. After dividing them up into nine piles he is again one coconut short and tries to take the monkey's slightly bloodied coconut. The monkey conks the second man on the head and kills him.

One by one each of the remaining castaways goes through the same process, until the 10th person to wake up gets the entire pile for himself. What is the smallest number of possible coconuts in the pile, not counting the monkeys?

How many coconuts in the store?

Here is that smallest number! 

Source 

Number Of Coconuts In The Pile


What was the problem? 

Absolutely no need to overthink on the extra details given there. Just for a moment, we assume the number of coconuts in the community pile is divisible by 10,9,8,7,6,5,4,3,2,1.

Such a number in mathematics is called as LCM. And LCM in this case is 2520. Since each time 1 coconut was falling short of equal distribution there must be 2519 coconut in the pile initially. Let's verify the fact for all 10 distributions tried by 10 people.Each time monkey kills 1 person & number of persons among which coconuts to be distributed decreases by 1 each time.

Follow me on Blogarama