Project Nayuki

Next-hop routing in real life

One day while walking on the streets in downtown Toronto, someone asked me for directions to a certain building. Normally, I would be expected to give her a precise list of instructions to take her right to her destination. But instead, I told her to walk some distance in a certain direction and to ask someone again.

From media (e.g. TV), from classroom exercises, and from interactions with other people, it is customary (in my culture) to give full directions on how to get to the requested place. A typical answer would be something like “Walk down twenty minutes this way until you hit Main Street, turn right and walk north half a mile until you see the green building, then enter through the second door from the left”. While this kind of answer is detailed and technically correct, I think it is not usable. These directions are often conveyed verbally (rather than written), and even as a seasoned student I personally find it hard to memorize and process this much new information. Furthermore, while following the instructions, it can be hard to tell if one is on the right path or one has strayed from it, which only increases the tension.

My proposed solution to the “giving directions” problem takes inspiration from the world of computers. In computer networks, particularly the Internet, data is routed one hop at a time. In the Internet Protocol (IP), each piece of data to be transported is called a packet, which contains a source address, a destination address, and a payload message. To transport a packet successfully, it usually needs to pass through tens of switching points, called routers. Now, the clever part is that when a router receives a packet, it does not know the exact downstream path to its destination (unless it’s the final router). It only knows, and only needs to know how to forward the packet to the next router that is at least one step closer to the destination, and let that router deal with the remainder of the task.

Here is my proposal: If someone asks you for directions to a place, and you know how to get there, and it’s a well-known place, and the path to it is well populated (e.g. city, not countryside), then you should tell them a small but very clear instruction on how to get closer (favoring clarity over completeness), and you should tell them to ask someone again when they have completed your instruction.

With this, I hope to have contributed an infinitesimal improvement to the art of giving directions.