Posts

Corrupt Courier Service - Puzzle

Two friends Sachin & Rahul are living in two different towns. Sachin wanted to send few diamonds to Rahul but there is big problem. Both Sachin & Rahul have lot's of boxes which can be locked with locks & keys. Both have multiple locks. There is only 1 courier service which can ship those diamonds & there is no other way. Even worse is that workers at that courier service have bad habit of stealing the goods from packages. But one good thing is that they don't take efforts to break locks if boxes being shipped are locked. 

How Sachin should send diamonds to Rahul?

Corrupt Courier Service Stealing The Package Content

This is what Sachin should do? 


Dealing With Corrupt Courier Service


What was the situation? 

What should Sachin do is that send diamonds in box locked with his own lock & key. On receiving that box, Rahul should put his own lock on the box without disturbing lock placed by Sachin. With 2 locks, he should send that box again to Sachin. Now, Sachin should remove his lock with his key & keep lock placed by Rahul intact. Finally, he need to send back the box with Rahul's lock on it.

Now Rahul can unlock the box using key that he has to get diamonds.

In this way, in every journey there would be always lock (or 2 locks in journey of box from Rahul to Sachin) on the box. So workers won't get any chance to steal those diamonds.   

Sending stuffs via corrupt courier service!

Optimize Weighing Balance

You can place weights on both side of weighing balance and you need to measure all weights between 1 and 1000. For example if you have weights 1 and 3,now you can measure 1,3 and 4 like earlier case, and also you can measure 2,by placing 3 on one side and 1 on the side which contain the substance to be weighed.

So question again is how many minimum weights and of what denominations you need to measure all weights from 1kg to 1000kg. 

Minimum Weights & their denominations to weigh 1-1000 kg

We require only......Click here to know! 

Source 

Optimisation Of Weighing Balance


What was the task given? 

Just for a moment, let's assume we have to weigh 1 to 30 Kg. Now you can weigh all those with

1,          2,          4,         6,          8,         10..........30

1           2, (2+1), 4, (4+1),6, (6+1), 8,(9+1),10..(29+1),30   .......For middle weights.


Now 6 can be weighed as 2 + 4 & 10 can be weighed as 2 + 8. We can eliminate those. That means we require only

1,        2,         4,          8,         16,

So we need weights of powers of 2.

Now if subtraction is allowed then,we require

1,        3,         6,          9,          12,          15,         18,...............30

For all weights ,

1, (3-1),3, (3+1), (6-1), 6, (6+1), (9-1),9,         12,         15,............30   

But 6 can be weighed as 9-3 , 12 as 9+3, 15 as 27-(9+3). So we can eliminate 6,12,15... This leaves only

1,         3,        9,        27,

In short, we need power of 3 only.      

For the given problem we need to weight 1 to 1000 Kg with subtraction allowed. So the maximum power of 3 that is less than 1000 is 7. To conclude, we require only 7 weights as below.

1,3,9,27,81,243,729 

Minimum weight to weigh 1-1000 kg


Follow me on Blogarama