The “flies and trains” problem is an interesting one. The problem itself is rather complex on the surface: Say you have a train traveling at 30 mph (or km/h if you want. The units donโt really matter). Thereโs a wall 30 miles (or km) ahead. A fly takes off from the front of the train toward the wall at 60mph (or km/h). When it reaches the wall, it instantly turns around and flies back to the train. When it reaches the train it instantly turns around and flies back to the wall. This continues until the train reaches the wall. How far does the fly travel?
You may start by saying that it takes 30 minutes for the fly to travel the 30 miles to the wall. In the meantime, the train has traveled 15 miles. That part’s easy. But when the fly starts heading back to the train it gets tricky. How far does the train travel before the fly reaches it?
Eventually you end up with a convergent geometric sequence to solve. At that point you can figure out that the fly has traveled 60 miles.
But there’s a far simpler way to approach the problem. If you haven’t spotted it already you’ll likely facepalm when I explain it.
Let’s start with just the train. It’s traveling 30mph and it’s 30 miles to the wall. That means it will take the train an hour to get there. Since the fly is traveling at 60mph and will also travel for an hour, it will travel 60 miles.
Yeah, that’s how simple this problem really is.
Sometimes it takes just a simple change in perpsective to turn something complicated into something really simple.