As it happens, I just ran across a related problem/solution. When designing electronic circuit boards (PCBs), the object of the game is to run "wires" (traces) between the electronic components laid out on the boards - transistors, resistors, capacitors and so forth.
However, it's not as easy as you might think. The traces are limited mostly to 2 dimensions, and many components cannot be directly connected without crossing wires.
The solution to that problem is to temporarily jump into the third dimension and run wiring on the other side of the PCB. In ancient times, typically only one side was etched with wiring traces and to wire the other side, you had to literally punch holes through the board and connect the crossovers with actual wire. These days, factories simply etch both sides of the board and make the cross-connection via a metal plug through the hole (known as a "via").
Vias are undesirable. They are less mechanically secure than a simple trace run and more likely to introduce funny electrical effects, especially at high frequencies. And they don't always cure everything. Really complex PCBs such as computer motherboards actually stack 2 double-sided PCBs to get 4 layers of wiring. But that's a bit much for most of us - although if you're so inclined I can direct you to some good design software (it's open-source and free).
So it's a bit of a game to design a PCB where the number of vias is kept to a minimum and the traces are kept as short and simple as possible.
Many people think that the only real way to do this is by hand, but automation is everywhere, and there are programs available to attempt optimal routing automatically. One such program is FreeRouting by Alfons Wirtz and it's in Java, if you want to see how it's done. As it is a visual program you can actually watch it run as it lays down traces, decides it made a bad move, rips them up and lays down new ones, making multiple passes until it is satisfied that it has done the best job reasonably possible.
And, incidentally, it reminded me that there are 2 other problems of this same general class: the "Bridges of Konigsberg" problem, where the graph overlays 7 islands connected by bridges where you have to visit each island crossing each bridge only once, and "map coloring" problems, where you have a limited number of colors and a geographic map of, say, post-Roman Europe where you have lots of little countries and you want to color each one such that it is a distinct color - no two adjacent countries being the same color.