Wednesday, July 21, 2021

Ant on a Rubber Rope Paradox

I am sure you know this paradox quite well that's why you are here to read this post but I think you are not able to grasp the solution of the first order differential equation.

Let's forget the calculus solution and do it with intuitive way. It might not provide you the solution but we may have great discussion.

To solve the complex problems like this, break the problem in chunks so start with the shorter version.

An ant is crawling on a stretchable rope at a constant speed of 1 cm/s. The rope is initially 4 cm long and stretches uniformly at a constant rate of 2 cm/s. When will the ant reach to the initial end point (Corner of the 4 cm rope)?

Initially the ant is at the starting point of the 4 cm rope.

After 1 second, the ant travels 1 cm on the rope. Now here consider the rope does not stretch continuously. It means the rope is stretched 2 cm after the end of every second (The stretching time is negligible i.e. a Femtosecond). This thought might change the whole approach but it can be quite easy to understand because if the rope would stretch continuously then it would stretch all the smallest slots of the second as the ant moves ahead. 

So After 1 second, the ant has traveled 1 cm, and the rope is stretched 2 cm uniformly. It means every one cm of the rope is stretched 0.5 cm so complete 4 cm is stretched to 6 cm.

It makes ant's traveled distance 1 cm to 0.5 cm more stretched so after 1 second the ant has traveled 1.5 cm.

After 2 seconds, the ant travels 1 more cm. So the ant is at the 2.5 cm from the start but the rope is stretched again 2 more cm after the end of 2 seconds. This time this increased 2 cm distance will be distributed between existing 6 cm uniformly. It means every one cm of the rope is stretched 0.3333 cm so complete 6 cm is stretched to 8 cm.

 


It makes ant's traveled distance 2.5 cm to '2.5 x 0.33333 = 0.8333'  more stretched so after 2 seconds the ant has traveled 2.5 + 0.83333 = 3.3333 cm and so on

By this way, the ant will reach to the initial end point between 9 and 10 Seconds.

But if you solve this question using calculus, the answer is 12.77 Seconds

L=4 cm (Initial Length of the rope)

v=2 cm/sec (Rope stretching Speed)

u=1 cm/sec (Ant's speed)

 

There is difference in the answers, this is because we took the different approach but it will give you an idea how you will try next time to solve this question for your own satisfaction.

Approach : 2

Initially the ant is at the starting point of the 4 cm rope.

a) After 1 second, the ant travels 1 cm on the rope.

So After 1 second, the ant has traveled 1 cm, and the rope is stretched 2 cm uniformly. It means every one cm of the rope is stretched 0.5 cm. This 1 cm has been traveled by the ant so stretching distance will be (1x0.5)/2=0.25.

Ant will travel 1.25 cm after 1 second.

b) After 2 seconds, the rope is stretched again 2 more cm. This time this increased 2 cm distance will be distributed between existing 6 cm uniformly. It means every one cm of the rope is stretched 0.3333 cm so complete 6 cm is stretched to 8 cm.

If ant would stand still at 1.25 cm then it would have been moved to 1.25x0.3333=0.41666 cm more that is 1.25+0.416666=1.666666667 cm but ant is moving with speed 1 cm/sec so this 1 cm distance traveled by the ant will be stretched with (1x0.3333)/2=0.16666 so the total distance moved by ant after 2 seconds will be 1.666666+1+0.166666 =2.833332 cm

c) After 3 seconds, the rope is stretched 2 more cm. This time this increased 2 cm distance will be distributed between existing 8 cm uniformly. It means every one cm of the rope is stretched 0.25 cm so complete 8 cm is stretched to 10 cm.

If ant would stand still at 2.83333 cm then it would have been moved to 2.83333x0.25=0.7083325 cm more that is 2.8333333+0.7083325=3.5416658 cm but ant is moving with speed 1 cm/sec so this 1 cm distance traveled by the ant will be stretched with (1x0.25)/2=0.125 so the total distance moved by ant after 2 seconds will be 3.5416658+1+0.125 =4.6666658 cm

d) After 4 seconds, the rope is stretched 2 more cm. This time this increased 2 cm distance will be distributed between existing 10 cm uniformly. It means every one cm of the rope is stretched 0.2 cm so complete 10 cm is stretched to 12 cm.

If ant would stand still at 4.6666658 cm then it would have been moved to 4.6666658x0.2=0.93333316 cm more that is 4.6666658+0.93333316=5.59999896 cm but ant is moving with speed 1 cm/sec so this 1 cm distance traveled by the ant will be stretched with (1x0.2)/2=0.1 so the total distance moved by ant after 2 seconds will be 5.59999896 +1+0.1 =6.69999896 cm and so on.

By this way, the ant will reach to the initial end point between 12 and 13 Seconds.

This is an almost same time calculated by calculus solution.

The difference between approach 2 and previous approach is the stretching distance calculation of ant's traveled distance. We took half of the stretching distance in approach 2 and it gets us near the exact answer.

Case II

Now Let's discuss one easy condition in this question. Suppose the ant is at the fixed distance from the initial point. Let's say 1 cm from the initial point but the ant does not move a bit. Only stretching factor of the rope makes it move further.

One thing is clear in this condition, the ant will never reach to the end point.

But it will never be at the 1 cm always so how much will it move.

At 0th second, it is 1 cm from the start.

After 1 second, rope is stretched 2 more cm. This 2 cm is distributed between existing 4 cm uniformly that makes the total length 6 cm. Every cm is stretch to 0.5 cm so the ant will be at 1.5 cm from the start. That is 25% of the total length.
75% remaining.

After  2 seconds, rope is stretch 2 more cm. This 2 cm is distributed between existing 6 cm uniformly that makes the total length 8 cm. Every cm is stretch to 0.3333 cm so the ant will be at 2 cm from the start. That is 25% of the total length. 75% remaining.

After  3 seconds, rope is stretch 2 more cm. This 2 cm is distributed between existing 8 cm uniformly that makes the total length 10 cm. Every cm is stretch to 0.25 cm so the ant will be at 2.5 cm from the start. That is 25% of the total length. 75% remaining.

It means if the ant does not move, The 'distance to cover' ratio does not change and that's why if the ant starts moving very slowly, it will always reach up to end,  if sufficient time is given and stretching speed is constant.

Case III

Now there is another condition. Suppose the rope gets doubled after every second. Speed of the ant is same i.e. 1 cm / second and initial length of the rope is also 4 cm.

What will happen now ? Will it reach up to the end point?

After 1 second, length of the rope is 8 cm. It means increased 4 cm is distributed between existing 4 cm uniformly. Every one cm of the rope is stretched to 1 cm. The ant will be at 2 cm but length of the rope will be 8 cm.

After 2 seconds, length of the rope is 16 cm. It means increased 8 cm is distributed between existing 8 cm uniformly. Every one cm of the rope is stretched to 1 cm. The ant was at 2 cm and now it travels 1 more cm in 2nd second, as the rope is stretched, the ant will be at 6 cm but length of the rope will be 16 cm.

After 3 seconds the ant will be at 14 cm from the start and length of the rope will be 32 cm.

After 4 seconds the ant will be at 30 cm from the start and length of the rope will be 64 cm.

The stretching speed of the rope is not constant, it is accelerating and that's why the ant will never reach up to the end point.

 



 

Saturday, March 9, 2019

Mathematics Quiz II - How Many Squares Are In This Picture


Calculate the total number of squares in the following image.




Answer :

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Answer : 40



Explanation :

If there is an n x n square (number of squares are in horizontal row should be equal to vertical row)
there is a way to calculate total number of squares in it.

Suppose there is a 2 x 2 square


How many squares are in it. If you say 4 then you are not absolutely right. Correct answer is 5. There is also a big square ACIG

Now how do you calculate this answer in mathematical terms.
Total number of squares in an n x n square =  n² + (n-1)² + (n-2)² + ......+ 1²
For 2 x 2 square = 2² + 1² = 4 + 1 =  5

Now suppose there is 3 x 3 square


How many squares are in it. Using above formula, we can easily calculate.

Total number of squares in an n x n square =  n² + (n-1)² + (n-2)² + ......+ 1²
For 3 x 3 square = 3² + 2²  + 1² = 9 + 4 + 1 =  14
So where are these 14 squares.
ABFE, BCGF, CDHG, EFJI, FGJK, GHLK, IJMN, JKON, KLPO, ACKI, BDLJ, EGOM, FHPN and ADPM

Now similar way we can calculate squares in Original question. There is one 4 x 4 square and two 2 x 2 squares in the image.
Total number of squares in a 4 x 4 square = 4² + 3² + 2²  + 1² = 16 + 9 + 4 + 1 =  30
Total number of squares in a 2 x 2 square = 2² + 1² = 4 + 1 =  5
There is another 2 x 2 square in image = 2² + 1² = 4 + 1 =  5
So Total number of squares = 30 + 5 + 5 = 40

Exercise for you : How many squares are in a Chess Board? :)

Friday, May 6, 2016

Gabbar Probability

Gabbar Gunshots Probability Analysis

Everyone must have watched movie Sholay(1975). Do you remember the entry scene of Gabbar Singh (Amzad Khan)?

"Kitne Aadmi The"


Exactly That was the scene. In this scene Gabbar kills three of his henchmen. Lets skip the middle conversation and jump to this part.
Gabbar drags a revolver from one of his man and asks the number of bullets in it.
He replies "six". Generally a revolver has 6 bullets compact in a round structure.
 

Here the game begins.

He already made up his mind to kill all three men because he doesn't like coward people but he does not want to shoot them just like that. He wants some entertainment here.

This is the game of probability. He fires three bullets in the air to make remaining count three because he needs to kill only three people and one bullet is enough for each.

Now he revolves the cylinder of revolver in a speedy way so even he doesn't know where are the remaining three bullets.

Then he takes a shot towards each man. 3 chambers are with bullets and 3 are empty, he thinks there are 50-50 chances here.

Now lets analyze the situation here.

What we know
Three bullets are in a consecutive order and three empty chambers are also in consecutive order but it is a circle so any chamber can be its firing position. Only we can say confidently that there is no single empty chamber between two bullets. There is only one gap between two bullets and it is of three empty chambers.

Lets give names to each chamber. Suppose Chamber 1, Chamber 2 and Chamber 3 are empty chambers and Chamber 4, Chamber 5 and Chamber 6 are with bullets. We gave these names anti clock-wise because cylinder moves in clock wise direction so 2 will be fired after first and third will be fired after second and so on.

First shot can be empty or it can be with bullet. Nobody knows. Suppose if first shot is empty. It means either Chamber 1 or Chamber 2 or Chamber 3 in its firing position.

Suppose Chamber 1 is in its firing position during first shot then other two men will be saved because next number is of 2 and then 3 and both are empty chambers so all are saved (That's what happens in the movie)



Suppose Chamber 2 is in its firing position during first shot then second man will be saved because 3 is an empty chamber but 4 is filled with bullet it means last man (Kalia) will be killed. Even he ate salt of his master but no mercy would be here in first place.

 

Suppose Chamber 3 is in its firing position during first shot then second and third both men will be killed because 4 and 5 the chambers are with bullets.

 

Suppose Chamber 4 is in its firing position during first shot then all three will be killed because 4, 5 and 6 are with bullets.

 

Suppose Chamber 5 is in firing position during first shot then second will be killed and third man will be saved because 1 is empty.

 

Suppose Chamber 6 is in firing position during first shot then first and second both will be saved because 1 and 2 both are empty.

 

In this analysis, there are chances, each man can be killed and each can be saved. But can you predict what may happen with next?

You can't predict the future of first two men in any condition. You can predict the future of only last man and that's in two conditions only.
1) If First man is killed and second is saved
2) If first man is saved and second is killed

In first situation, you can easily find that chamber 6 was in firing position during first shot that's why first is killed and second is saved because second got chamber 1 which is empty. Now third man will get chamber 2 which is also empty and he will be saved too. There is no other condition for this situation.

In second situation, still you can find that chamber 3 was in firing position that's why first is saved and second is killed because second got chamber 4 which is with bullet. Now third man will get chamber 5 which is also with bullet and he will be killed too. There is no other condition for this situation too.

Both are unique situations.

Except these two conditions you can't predict future of third man.

Suppose first two are saved then you can't predict the fate of third.
He can be killed if chamber 2 was in firing position during first shot.
He can be saved if chamber 1 was in firing position during first shot.

Suppose first two are killed even then you can't predict the fate of third.
He can be killed too if chamber 4 was in firing position during first shot.
He can be saved if chamber 5 was in firing position during first shot.

Conclusion :
If second shot is different than first shot only then you can predict the behaviour of third shot.

Moral :
But after all none of this matters because eventually Gabbar would kill all three.