The good news is that your experimental robo-ants are a success! The bad news is that you accidentally just gave them the ability to shoot deadly lasers …and you can’t turn it off. You have five minutes to stop them before the lasers go online. Until then, all of your robo-ants will walk inside their habitat at a speed of exactly 1 meter per minute. If they bump into each other or hit a dead end, they’ll instantly turn around and walk back the way they came. When five minutes are up, they’ll turn on their lasers, break free, and stream out into the world, carving a path of destruction as they go. Your one chance to stop them is to insert the two emergency vacuum nozzles into the habitat and suck the ants up before they break free. The nozzles can press into any one location in the habitat through a membrane covering its front side, and any ants that walk past will be sucked up and deactivated. You can’t move the nozzles once they’re placed without leaving a hole that the robo-ants would pour out of, so choosing the right spots will be key. The habitat is made out of meter-long tubes. When the robots reach an intersection, they will pick randomly whether to go left, right, or forward. They only go backward if they hit hit another robo-ant or a dead end. Unfortunately, there are hundreds of them inside the habitat, and if even one escapes, it’ll do a lot of damage. With just less than five minutes remaining, where should you place the 2 vacuum nozzles to suck up all the robo-ants? Pause the video now if
you want to figure it out for yourself. Answer in: 3 Answer in: 2 Answer in: 1 With robo-ants ricocheting all over the habitat, it might seem impossible to stop them before they break free. But this situation is simpler than it seems. Here’s why. Imagine just two robo-ants crawling toward each other. When they collide, they immediately reverse directions. And what would that sequence of events look like if they crawled past each other instead? It would look exactly the same before and after their collision, but with their positions swapped. This is true every time a pair of robo-ants meet. Because the identities of individual ants don’t matter, you just need to figure out where you should put the nozzles to capture any single ant walking without interruption for less than 5 minutes, starting from any point in the habitat. That’s much easier to conceptualize and solve. Placing the nozzles at intersections where three or four tubes meet seems like your best bet since that’s where the robo-ants might otherwise change directions and miss your nozzles. There are only four intersections… which two should you pick? The top right intersection has to be one of them. If it isn’t, an ant crawling down from this intersection toward the dead end would crawl for four minutes to get back to the intersection, and then go in any of three directions, walking for at least another minute. Once you’ve placed a nozzle in the top right, the only other choice that has a chance to work is the bottom left. To see that this works, imagine an ant anywhere else in the habitat. Worst case scenario, the ant would start right next to the vacuum nozzle, marching away from it. But in all those worst cases, the ant would march for at most 4 meters before being sucked up into the vacuum. No other choice of two intersection points is guaranteed to get all the robo-ants within five minutes. Having vacuumed them all up, you’ve averted a major crisis. Before you mess with robo-ants again, you’ll want to have a robo-anteater ready. And wouldn’t it be cool if it could fly and breathe fire? There’s no way that could go wrong!