Saturday, September 12, 2009

The 8 ants problem

Here's the solution to the 8 ants problem:

Let all ants have different velocities. Since each ant is moving with some constant velocity, the relative velocity between any two ants (V1-V2) will always be constant. Constant velocity means straight line displacement. Hence,

(1) Relative displacement of any ant with respect to any other ant will be a straight ine.

Meaning, if ant A1 looks at ant A3, it will see A3 as moving in a straight line (relative to A1). Now, let A1 and A2 be those ants about which it is given that they meet all others. Let us see from the frame of reference of A1 (A1 is stationary at origin in this frame). A1 will see all ants moving at different velocities along straight lines. But since A1 meets all ants at least once,

(2) The straight line paths of all ants must pass through the origin.

Also, it is true that:
(3) Two straight lines can intersect only once.

Now we know that the locus of all ants are straight lines passing through the origin. Also, if any ant has to meet any other ant, it can do so only at the origin (by (3)). Now, since ant A2 meets all other ants, we can be sure that the meeting happens only at the origin. It is only possible if all the ants reach the origin at the same time. I means that each ant meets every other ant at origin. Hence Proved.

Now, there is a small issue. Not with the solution, but with the problem itself. It is not valid when all the ants are moving in one straight line. (because then, postulate 3 won't hold). I can give you one simple example to show that. Suppose A2 ... A8 are moving in the same direction in a straight line. V2>V3=V4=V5=V6=V7=V8. A2 is lagging all others at this point in time. And A1 is moving in the opposite direction towards all others. Hence, A1 will meet all ants. Also, A2 will meet all ants, as its velocity is greater than all others. But V3..V8 will never meet as they are moving with the same speed along the same line. Hence all ants do not meet.

Saturday, February 23, 2008

The prisoners and the warden puzzle (survival instinct) solution

Following is the solution of one of the most intriguing of the puzzles I've ever come across, the Survival Instinct puzzle, which I discussed earlier in this blog.

The team nominates a leader. The group agrees upon the following rules:

The leader is the only person who will announce that everyone has visited the switch room. All the prisoners (except for the leader) will flip the first switch up at their very first opportunity, and again on the second opportunity. If the first switch is already up, or they have already flipped the first switch up two times, they will then flip the second switch. Only the leader may flip the first switch down, if the first switch is already down, then the leader will flip the second switch. The leader remembers how many times he has flipped the first switch down. Once the leader has flipped the first switch down 44 times, he announces that all have visited the room.

It does not matter how many times a prisoner has visited the room, in which order the prisoners were sent or even if the first switch was initially up. Once the leader has flipped the switch down 44 times then the leader knows everyone has visited the room. If the switch was initially down, then all 22 prisoners will flip the switch up twice. If the switch was initially up, then there will be one prisoner who only flips the switch up once and the rest will flip it up twice.

Tuesday, August 14, 2007

Soln to the Bridge and the Juggler Problem



London bridge is falling down; because a less intelligent juggler is trying his feat over the fragile bridge. This is about the juggler story (Where does the weight go?) which was posted earlier in this blog.

So, we had a classical riddle of a man crossing a bridge juggling all the way thereby reducing the effective weight acting on the bridge. We had to find a way to mathematically disprove this solution.

Note that when the man applies some force on a ball (to throw it up), the ball applies an equal and opposite force on him (downwards). This force gets transferred to the bridge as there is no acceleration of the man in the vertical direction. So, the total force acting on the bridge is the sum of the weight force of the man and the force applied by the ball.

( Let < signify "less than or equal to" and > signify "more than or equal to")

Let T be the time for which a ball remains in air. And let t be the time for which the ball remains in the hands of the man. Since the man has to handle 9 more balls before the first ball returns in his hands,
T > 9t

Let v be the velocity with which the ball leaves the man's hands. This is also the maximum velocity of the ball. Time required for the ball to reach the highest point is T/2. Hence,

v=gT/2


Let the man apply a constant force F on the ball in his hand for a period t while throwing it up. The ball comes down with a velocity v downwards and is thrown back up with a velocity v upwards. Hence the change in momentum of the ball is m(2v), where m is the mass of the ball. Hence,

F = 2.m.v/t + mg

=> 2mv = (F - mg).t



by the inequality of t,


(F - mg).T/9 > 2.m.v

Substituting the value of v,

(F - mg).T/9 > 2.m.(gT/2)

(F - mg)/9 > mg

F - mg > 9 mg

F > 10 mg

It implies that the force applied by each ball on the man would be greater than or equal to the weight of all ten balls. If one juggles, he is effectively putting more force on the bridge than he would otherwise have. Hence, juggling does no good. The strength of the bridge has to be at least 70.9 kg for that man to pass through with those balls; and even with that strength, it's not prudent to juggle.


:) crazy solution: The man might jog around for a couple of weeks and lose some weight :-)

.

Wednesday, June 6, 2007

Solution for "Where does the weight go?"

WE HAD a classical riddle of a man crossing a bridge juggling all the way thereby reducing the effective weight acting on the bridge. We had to find a way to mathematically disprove this solution.

Note that when the man applies some force on a ball (to throw it up), the ball applies an equal and opposite force on him (downwards). This force gets transferred to the bridge as there is no acceleration of the man in the vertical direction. So, the total force acting on the bridge is the sum of the weight force of the man and the force applied by the ball.

( Let < signify "less than or equal to" and > signify "more than or equal to")

Let T be the time for which a ball remains in air. And let t be the time for which the ball remains in the hands of the man. Since the man has to handle 9 more balls before the first ball returns in his hands,
T > 9t

Let v be the velocity with which the ball leaves the man's hands. This is also the maximum velocity of the ball. Time required for the ball to reach the highest point is T/2. Hence,
v=gT/2


Let the man applies a constant force F on the ball in his hand for a period t while throwing it up. The ball comes down with a velocity v downwards and is thrown back up with a velocity v upwards. Hence the change in momentum of the ball is m(2v), where m is the mass of the ball. Hence,

F = 2.m.v/t + mg

=> 2mv = (F - mg).t



by the inequality of t,


(F - mg).T/9 > 2.m.v

Substituting the value of v,

(F - mg).T/9 > 2.m.(gT/2)

(F - mg)/9 > mg

F - mg > 9 mg

F > 10 mg

It implies that the force applied by each ball on the man would be greater than or equal to the weight of all ten balls. If one juggles, he is effectively putting more force on the bridge than he would otherwise have. Hence, juggling does no good. The strength of the bridge has to be at least 70.9 kg for that man to pass through with those balls; and even with that strength, it's not prudent to juggle.

Wednesday, April 18, 2007

Solution to The Clocks' Problem

Problem:

A photograph
is all you've got. It shows two clocks. Two digital clocks. Here's how it shows:

Clock 1
February 29, 2:07 pm

Clock 2
February 29, 2:09 pm

If you're asked, "By how much is the second clock faster than the first?", what would you say?

Solution:

There can be two extreme cases. In one of the cases, when the photograph is taken the time in the first clock is 2pm+7minutes+0.000 seconds (or delta1 seconds) and that in the second clock is 2pm+9minutes+59.999 seconds (or 10 minutes minus delta2 seconds). In this case, the time difference between the clocks becomes 2 minutes and 59.999 seconds : Or 3 minutes minus [delta1+delta2] seconds. As time is continuous, delta1 and delta2 may be infinitesimally small. So 3 minutes is the maximum possible time difference between the clocks.

In the other case, the time in the first clock may be 2pm+7minutes+59.999 seconds (or 8 minutes minus delta1 seconds) and that in the seconds clock may be 2pm+9minutes+0.000 seconds (or delta2 seconds). In this case, similarly, the time difference between the clocks is 1 minute and 0.0001 seconds : Or 1 minute plus [delta1+delta2] seconds. Again, delta1 and delta2 are infinitesimally small in the limiting case. So 1 minute is the minimum possible time difference between the clocks.

The time difference between the clocks, hence, can be equal to any value in the open interval (1 minute, 3 minute). Boundary values are excluded. So if you're asked that by how much is the second clock ahead of the first, you should say it's between one to three minutes.

Tuesday, March 27, 2007

Solution to the 12 coin problem

N.B. : Do not see the solution unless you have given enough time to the problem. If you can't solve the problem it is recommended that you think over it at least for one day before before looking at the solution. Now, the 'close' button is on the top right hand side of the window - close this page and start thinking over this problem. Good Luck. .............. Return to the problem.


The following plan can be followed, let us number the coins from 1 to 12. For the first weighing let us put on the left pan coins 1,2,3,4 and on the right pan coins 5,6,7,8.

There are two possibilities. Either they balance, or they don't. Suppose after the first weighing that the set 1,2,3,4 balances with 5,6,7,8.

Now weigh 9,10,11 against 1,2,3. If they balance, then coin 12 is the unequal coin. Weigh coin 12 against coin 1 to determine whether coin 12 is heavier or lighter.

If instead the set 9,10,11 is *heavier* than 1,2,3, then any one of coins 9,10,11 could be heavier. Weigh coin 9 against coin 10; if they balance, then coin 11 is heavier. If they do not balance, then the coin that weighs more is the heavier coin. If the set 9,10,11 is *lighter* than 1,2,3, then any one of coins 9,10,11

could be lighter. Weigh coin 9 against coin 10; if they balance, then coin 11 is lighter. If they do not balance, then the coin that weighs less is the lighter coin.


That was the easy part.

What if the first weighing 1,2,3,4 vs 5,6,7,8 does not balance? Then any one of these coins could be the different coin. Now, in order to proceed, we must keep track of which side is heavy for each of the following weighings.

Suppose that 5,6,7,8 is the heavy side. We now weigh 1,5,6 against 2,7,8. If they balance, then the different coin is either 3 or 4. Weigh 4 against 9, a known good coin. If they balance then the different coin is 3, otherwise it is 4.

Now, if 1,5,6 vs 2,7,8 does not balance, and 2,7,8 is the heavy side, then either 7 or 8 is a different, heavy coin, or 1 is a different, light coin.

For the third weighing, weigh 7 against 8. Whichever side is heavy is the different coin. If they balance, then 1 is the different coin. Should the weighing of 1,5, 6 vs 2,7,8 show 1,5,6 to be the heavy side, then either 5 or 6 is a different heavy coin or 2 is a light different coin. Weigh 5 against 6. The heavier one is the different coin. If they balance, then 2 is a different light coin.

Thursday, March 22, 2007

Pirates and the Gold Coins

Problem:

There are 5 pirates on a boat, conveniently named 1, 2,3,4,5. These 5 pirates have just dug up a long lost treasure of 100 gold pieces. They now need to split the gold amongst themselves, and they agree to do it in the following way:

Pirate 5 will suggest a distribution of the coins. All 5 pirates will vote on his proposal. If an absolute majority approves the plan, then they proceed according to the plan. If he fails to pass his proposal by an absolute majority, then pirate 5 would be killed, and it becomes 4's turn to propose a distribution of the coins among the remaining 4 pirates. They continue this way until either a) a plan has been approved, or b) only pirate 1is still alive (in which case he keeps the whole treasure).

Can you tell how the treasure would be distributed? How many equilibrium states are possible here? The following points must be noted:

  • Pirates are very smart (rational). They always think ahead.
  • Above all else, a pirate must look out for his own life. No pirate wants to die.
  • After life itself, there is nothing a pirate values more than gold.
  • A pirate doesn't derive any pleasure from killing any of his fellows. Nor does he have any interest in keeping him alive as far as his own payoff is the same. He would take his decision randomly if his payoff is the same.
  • Exactly 50% votes in favour does not constitute absolute majority.


 

Solution:

Pirate 1 would love if all other pirates are dead and he takes away all the treasure.

Suppose 5,4,3 are dead and only 1 and 2 are alive. So it's pirate 2's turn. 1 will vote against 2 and keep all the money. So, 2 doesn't want 3 to die. 1 wants 3 to die.

If there are 1,2,3 left, 2 will vote for 3 and 1 votes against him. So, 3 dies. 2 doesn't want this to happen. So, 2 doesn't want 4 to die. Also, 3 doesn't want 4 to die. 1 wants 4 to die.

So, if 1,2,3,4 are left, it's a good chance for 4. He can keep all the money to himself. Still, fearing for their own life, 2,3 will vote in his favour. In this case, 4 gets 100 coins and 1,2,3 get nothing. So, 4 wants 5 to die.

Now suppose 5 keeps all the money to him. 4 will vote against him. Now, whether 5 dies or not, 1,2,3 still get the same amount. As we have assumed, the pirates don't derive any pleasure from killing their fellows. Nor do they have any interest in saving their lives as far as their own payoff is the same. Pirates may take their decision randomly if their payoff is the same. Now, what if 5 keeps all the money to himself, 1,2,3 may or may not vote for him. Their payoff would in any case be zero and their lives would be safe. But if any one of the three pirates (1,2,3) votes against 5, 5 will have to die as he would have two of the four votes against him.

5 knows this. He won't take this risk. He has to win only 3 votes as he knows 4 will never vote for him. He gives 1 coin each to 1,2,3 and keeps 97 coins with himself. Now, 1,2,3 will vote for him and 4 will vote against him. This is the only possible equilibrium.

Please do bother me if you want any clarifications. Post a comment.