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.

Tuesday, March 13, 2007

Masters of Logic ........ Real Puzzles

Q.1 There are 10 coin making machines. 9 out of them make coins weighing 1 gm each. One (unknown) machine is faulty and makes coins 100 mg heavier. You have an electronic weighing machine (single pan). Can you tell which machine is faulty by using the weighing machine only once?

Q.2 This one's not for kids. There are 12 coins. One of them is slightly heavier or lighter than the others. You have a classical balance with two pans (which only indicates which pan is heavier/lighter). You are allowed to weigh only three times. Can you find out the coin which is different, and also whether it's heavier or lighter?

For solutions, mail me or post a comment.

Masters of Logic : Virtue

Are you interested in ciphers? If each letter is substituted by some other random letter, how would you know the correct letters with no other hints given? There is a particular method of solving this type of problems and generally it involves a lot of guesswork. The longer the text of cipher you have, the easier it is to solve. Some ciphers don't even contain spaces and punctuation marks, making it all the more difficult to break them.

But the one given here is a nice one. It's a poem. I have not deleted spaces and punctuations, and it's long enough. And what's more, it's rhyming too !

Ybffu cst, yv ivvn, yv isnp, yv lejwku,

Ukf lejcsn vh ukf fseuk sgc yqt,

Ukf cfb yksnn bffo ukt hsnn uvgjwku;

Hve ukvx pxyu cjf.


Ybffu evyf, bkvyf kxf sgwet sgc lesrf

Ljcy ukf esyk wszfe bjof kjy ftf,

Ukt evvu jy frfe jg juy wesrf,

Sgc ukvx pxyu cjf.


Ybffu yoejgw, hxnn vh ybffu csty sgc evyfy,

S lva bkfef ybffuy ivposiufc njf,

Pt pxyji ykvby tf ksrf tvxe invyfy,

Sgc snn pxyu cjf.


Vgnt s ybffu sgc rjeuxvxy yvxn,

Njqf yfsyvgfc ujplfe, gfrfe wjrfy;

Lxu ukvxwk ukf bkvnf bvenc uxeg uv ivsn,

Ukfg ikjfhnt njrfy.


You could crack it using machines. But I suggest you use the one installed over your ears. If you crack it, let me know. Post it in the comments.


HINTS


This type of ciphers are known as monosubstitution ciphers. Some of the monosubstitution ciphers have a keyword with which the whole text can be decoded. This one is slightly more difficult as it has no keyword. Each letter in the alphabet has been randomly assigned some other letter. Suppose if 'a' stands for 'g' somewhere, then it is true for the whole text. Now let us see how to find that out.

We should use the letter frequency method. Letter 'E' is most frequently used in English, followed by T, A, O, H, N, I ans S respectively. This knowledge may be used to identify some of the letters in the code. Next, notice the two-letter words. Most frequently used two-letter words n English are 'of', 'to', 'in', 'it', 'is', 'be', 'as' in this order. (source : _http://deafandblind.com/word_frequency.htm)

The letter frequency distribution for this code is as follows:


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
1 14 17 0 21 54 15 6 8 21 25 7 0 21 4 8 2 8 25 12 32 30 8 15 37 1



Hint for this problem : 'u' in the cipher stands for 't'.


Monday, March 12, 2007

Test

This is a test post

Test post


Thursday, March 8, 2007

Can I find a trick recalling pi easily?

Now how do these lines make sense to you?

  • Now I want a drink, alcoholic of course, after the heavy chapters involving quantum mechanics.
  • Can I have a large container of coffee?

These are what are known as mnemonics. They help you remember certain numbers and relations. The number of letters in each word of these sentences represents a digit in ...(yes, you guessed right).......Pi.

So, the first sentence gives:
3.14159265358979
which is the value of pi upto 14 digits after decimal.

The following mnemonic I had memorized long ago. It gives the value of pi up to 31 decimal places. (For the 32nd place you could just remember my first name "ankit")

Now I, even I, would celebrate
in rhymes unapt, the great
immortal syracusan, rivaled nevermore,
who in his wondrous lore,
passed on before,
left men his guidance,
how to circles mensurate.

I should have given proper credit to the creator but unfortunately I do not remember the name. (Strange memory I've got ! )

The following mnemonic is still better:

Man, I can't, I shant
formulate an anthem where the words comprise mnemonics
dreaded mnemonics for pi
The numerals just bother me, always
even the dry anterior
try to request something lower (zero)
in numerary aptitude, even I, pantaloon gallant
I cannot actualize the requested mnemonics
the leading fifty, I...

It gives the value of Pi up to the first fifty digits (i.e. 49 digits after decimal). And it's singable too !

An approximate value of pi is:

3.1415926535897932384626433832795028841971693993751058209749445923078164062

862089986280348253421170679821480865132823066470938446095505822317253594081

284811174502841027019385211055596446229489549303820

Some other pi-mnemonics are:
  • Pie. I wish I could determine pi. "Eureka!" cried the great inventor. "Christmas pudding, Christmas pie, is the problem's very center!"
  • For a girl I loved contrived; by nature tough, her heart survived.
  • How I wish I could calculate pi faster.
  • But I must a while endeavour to reckon right the ratio.
And if you haven't already guessed it, the title of this post itself is a pi-mnemonic.

Monday, March 5, 2007

Masters of LOGIC

I was just thinking about cd's and magnetic tapes when a quirky problem came to my mind. How much physical space do we really need to store a particular amount of information? Maybe CS/IT guys have a straightforward answer for this.

Anyways, how would you store, say a three page letter on a metre stick? (A one metre long thin cylindrical metal stick). Write on it? Of course you can write in very small size letters. But is there any other method? Make some marks or something. What is the most bizarre method? Suppose matter is continuous and you have technology to achieve any level of precision you want. Suppose we have machines that can read (and make) the minutest of marks with infinite degree of precision.

Now can you encode an entire book on that rod (in a retrievable format, of course) by making a single mark on it?

A book on a metre stick

Here is one of the solutions of the above problem. The problem is that we have to encode some large amount of information on a stick of one metre size using only one mark on the stick.

Let's see how we can do it. There are 26 letters from A to Z, 10 numbers, many special characters. Assign a two digit number to each of the letters, numerals, 'space' and special characters. (As they do in ASCII. Or else use a three digit number instead of two)

Now for the entire text we have a series of numbers and putting them together we get a very large number (say b). Now put a mark on the stick such that it divides the stick into the ratio a/b, where 'a' is a pre-decided number (say 10^1000000) and b is the large number we have got.

Now if have an infinite degree of precision in reading, we can always retrieve that text again!

Of course, some of the assumptions are highly chimerical - but anyways it was just a thought exercise !