Posts

Showing posts with the label walk

Puzzle : Ants Walk on a Stick

Twenty-five ants are placed randomly on a meter stick. Each faces east or west. At a signal they all start to march at 1 centimeter per second. Whenever two ants collide they reverse directions. How long must we wait to be sure that all the ants have left the stick?

This sounds immensely complicated, but with a simple insight the answer is immediately clear. What is it?

Ants Walk on a Stick


You need to wait for.....seconds only!
 

Analysing Ants Walk on a Stick


Read the question associated with the walk.

For a moment, let's assume that there are only 2 ants 20 cm away from either end of the stick. Now, after 30 seconds they both will collide with each other & will reverse the direction.

At 50th seconds they will be at the end of the sticks falling off the stick.

Analysing Ants Walk on a Stick

So after 80 seconds they will fall off the stick. Now, imagine if ants avoid collision & pass through (or above) each other. Still, both ants would need 80 seconds to leave the stick.


In short, 2 ants' collision & reversal in direction is equivalent to their passing through each other. The other ant continues the journey on the behalf of the first ant & vice versa.

And in case, if they were 100 cm apart, they would need 100 seconds to get off the stick. Again, after collision at halfway mark here, the other ant travels the rest of distance that other ant was supposed to travel.

Analysing Ants Walk on a Stick
On the similar note, we can say that even if there are 25 ants on the stick then each ant will cover some distance on the behalf of some other ant. And we need to wait for maximum 100 seconds if 1 of 25 ants is at the edge of the stick. 

All 25 ants together completes the journey of each others in 100 seconds. The ant which is at the edge of stick might complete journey of some other ant which might be only 10 seconds long. But the 100 seconds journey of that ant will be shared by rest of ants. 

A Warden Killing The Boredom

A warden oversees an empty prison with 100 cells, all closed. Bored one day, he walks through the prison and opens every cell. Then he walks through it again and closes the even-numbered cells. On the third trip he stops at every third cell and closes the door if it’s open or opens it if it’s closed. And so on: On the nth trip he stops at every nth cell, closing an open door or opening a closed one. At the end of the 100th trip, which doors are open?

A Warden Killing The Boredom



Open Doors in an Empty Prison!


Read the story behind the title!

Let's take few cells into consideration as representatives.

The warden visits cell no. 5 twice - 1st & 5th trip.1 & 5 are only divisors of 5.

He visits cell no. 10, on 1st, 2nd, 5th, 10th trips i.e. 4 times. Here, divisors of 10 are 1,2,5,10.

He stops cell no. 31 only twice i.e. on 1st and 31st trip.

He visits cell no.25 on 1st, 5th, 25th trips that is thrice.

In short, number of divisors that cell number has, decides the number of visits by warden.

For example, above, cell no.5 has 2 divisors hence warden visits it 2 times while 10 has 4 divisors which is why warden visits it 4 times.

But when cell number is perfect square like 16 (1,2,4,8,16) or 25 (1,5,25) he visits respective cells odd number of times. Otherwise for all other integers like 10 (1,2,5,10) or like 18 (1,2,3,6,9,18)  or like 27 (1,3,9,27) he visits even number of time.

For prime numbers, like 1,3,5,....31,...97 he visits only twice as each of them have only 2 divisors. Again, number of visits is even.

Obviously, the doors of cells to which he visits even number of times will remain closed while those cells to which he visits odd number of time will remain open.

So the cells having numbers that are perfect square would have doors open. That means cells 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100 would be having their doors open.

Open Doors in an Empty Prison!

A Man Walking on Railroad Bridge

A man is walking across a railroad bridge that goes from point A to point B. He starts at point A, and when he is 3/8 of the way across the bridge, he hears a train approaching. The train's speed is 60 mph (miles per hour). The man can run fast enough so that if he turns and runs back toward point A, he will meet the train at A, and if he runs forward toward point B, the train will overtake him at B.



How fast can the man run?


He must be running at 'this' speed! 

Speed Needed For Run on Bridge


Why to calculate the speed?

If the man turns back and runs towards A for 3/8 of distance while train reaches at the point A. That means the train train reaches at point A when man runs for 3/8 distance.

So if man continues to run towards point B then, while he covers 3/8 distance the train reaches at point A. Now, man is 3/8 + 3/8 = 6/8 = 3/4 distance away from the point A where B is 1/4 away from him now.



Again, we know, the train will overtake the man at point B covering total distance between A and B. Till then man can run only 1/4 th distance between A and B to reach B.That mean the train must be 4 times faster than the speed of man.

Since, train is traveling at 60 mph, the speed of man = (1/4)x60 = 15 mph.

A Visit To Grandmother's Home!

A father wants to take his two sons to visit their grandmother, who lives 33 kilometers away. His motorcycle will cover 25 kilometers per hour if he rides alone, but the speed drops to 20 kph if he carries one passenger, and he cannot carry two. Each brother walks at 5 kph

Can the three of them reach grandmother’s house in 3 hours?

A Visit To Grandmother's Home!


Do you think it's impossible? Click here!

Planning Journey Towards Grandmother's Home


What was the challenge in the journey?

Yes, all three can reach at grandmother's home within 3 hours. Here is how.

Let M be the speed of motorcycle when father is alone, D be the speed of motorcycle when father is with son and S is speed of sons.  Let A and B are name of the sons.

As per data, M = 25 kph, D = 20 kph, S = 5 kph.

1. Father leaves with his first son A while asking second son B to walk. Father and A drives for 24 km in 24/20 = 6/5 hours. Meanwhile, son B walks (6/5) x 5 = 6 km.

2. Now father leaves down son A for walking and drives back to son B. The distance between them is 24 -6 = 18 km.

Planning Journey Towards Grandmother's Home




3. To get back to son B, father needs 18/(M+S) = 18/(25+5) = 18/30 = 3/5 hours & in that time son B walks for another (3/5) x 5 = 3 km. Now, son B is 6 + 3 = 9 km away from source where he meets his father. While son A walks another (3/5) x 5 = 3 km towards grandmother's home.

Planning Journey Towards Grandmother's Home

4. Right now father and B are 24 km while A is 6 km away from grandmother's home. So in another 24/20 = 6/5 hours father and B drive to grandmother's home. And son B walks further (6/5) x 5 = 6 km reaching grandmother's home at the same time as father & brother B.

In this way, all three reach at grandmother's home in (6/5) + (3/5) + (6/5) = 3 hours.

Planning Journey Towards Grandmother's Home

In this journey, both sons walks for 9 km spending 9/5 hours and drives 24 km with father taking (6/5) hours. Whereas, father drives forward for 48 km (24 km + 24 km) in (6/5) + (6/5) hours and 15 km backward in 3/5 hours. 
  

"Share The Walk; Share The Ride!"

You and I have to travel from Startville to Endville, but we have only one bicycle between us. So we decide to leapfrog: We’ll leave Startville at the same time, you walking and I riding. I’ll ride for 1 mile, and then I’ll leave the bicycle at the side of the road and continue on foot. When you reach the bicycle you’ll ride it for 1 mile, passing me at some point, then leave the bicycle and continue walking. And so on — we’ll continue in this way until we’ve both reached the destination.

Will this save any time? 

You say yes: Each of us is riding for part of the distance, and riding is faster than walking, so using the bike must increase our average speed.

I say no: One or the other of us is always walking; ultimately every inch of the distance between Startville and Endville is traversed by someone on foot. So the total time is unchanged — leapfrogging with the bike is no better than walking the whole distance on foot.

"Share The Walk; Share The Ride!"

Who’s right?

Look who is right in the case! 


"Okay, I'm Wrong in the Case!"


Where I went wrong?

That's going to save time for sure.

Let's assume that the distance between Startville and Endville is 2 miles. And suppose we walk at the same speed of 4 mph and ride bicycle at the speed of 12 mph.

Then I will travel for first 1 mile in 5 minutes leave the bicycle and start walking thereafter. You take 15 minutes to reach at the point to pick up bicycle and ride next mile. For next mile, I need 15 minutes as I am walking & you need only 5 minutes ride on bicycle. So exactly after 20 minutes we will reach at Endville.

And what if we had walked entire 2 miles distance? It would have taken 30 minutes for us to reach at the destination.

One thing you must have noticed, each of us walked for 1 mile only and ride on bicycle for other mile which saved 10 minutes of our journey. Imagine it as if we had 2 bicycles where we ride 1 mile in 5 minutes, leave bicycles and walk next mile in another 15 minutes.

So my argument in the case is totally wrong. It would have been correct if I had waited for you after finishing 1 mile ride on bicycle and then started to walk next mile. 

In that case, you will reach at the destination in 20 minutes but I need 30 minutes as I wasted 10 minutes in middle. 


Conclusion: 

My argument - 

"One or the other of us is always walking; ultimately every inch of the distance between Startville and Endville is traversed by someone on foot."

tells only half story.

Yes, ultimately every inch of the distance between Startville and Endville is traversed by someone on foot but the distance that each of us walk is equal though different parts of journey. And for the rest of distance we ride on bicycle where total time required for journey is saved.

Time Of Arrival?

One day Rohit decided to walk all the way from city Bangalore to Tumkur. He started exactly at noon. And Samit in city Tumkur decided to walk all the way to Bangalore from Tumkur and he started exactly at 2 P.M. on the same day.

Both met on the Bangalore - Tumkur Road at five past four, and both reached their corresponding destination at exactly the same time.

At what time did we both arrive?


Time Of Arrival - Puzzle to puzzle you
      Beginning of Journey

Find here their arrival time! 

Finding The Time Of Arrival


What was the puzzle? 

Let 'x' km/minute be the speed of Rohit's walk. He started to walk at 12 PM & met Samit at 4:05 PM. That means he has walked for 245 minutes. 

Distance traveled by Rohit = 245x km

Let 'y' km/minute be the speed of Samit's walk. He started to walk at 2 PM & met Samit at 4:05 PM. That means he has walked for 125 minutes.

Distance traveled by Samit = 125y km 

Puzzle to puzzle you
    Time of Meeting


Now after meeting each other they resumed their journey further. That means Rohit continues to Tumkur & covers distance of 125y km at his speed of x km/minute. Time taken by him further to complete the journey is 125y / x minutes (Time = Distance/Speed).

Follow me on Blogarama