A bunch of ants are left inside a very, very, tight tube, and they keep colliding with each other and turning around. How long will it take them to escape?

I am excited to tell you that I just released the alpha version of my “Pydont's” book, a book that compiles all the “Pydon't” articles you can read here. You can get the book at leanpub: leanpub.com/pydonts.

Photo by Lorenz Lippert on Unsplash.

Problem statement

Suppose you have a very thin pipe. The pipe is the exact width of an ant, so that ants can travel inside the pipe, but they can't cross paths because the pipe isn't wide enough for that. Assume an ant takes exactly 1h to travel through said pipe.

I will now place several ants along the pipe, facing different directions, and all ants will start walking in a straight line. When two ants collide, they both turn around and continue walking in the opposite direction they were walking in. When an ant reaches the end of the pipe, the ant just leaves the pipe.

What is the shortest amount of time that ensures all ants have left the pipe?


The solution to this problem will be posted here after this problem has been live for 2 weeks. Feel free to email me your solution or to comment it here if you want it featured in the solution page.

If you enjoyed the problem and would like to get new problems directly in your inbox, be sure to subscribe to the Problems newsletter.

If you liked this article and would like to support the mathspp project, then you may want to buy me a slice of pizza 🍕.

Previous Post Next Post

Blog Comments powered by Disqus.