You need to connect a handful of towns with cable, using as little as possible. The natural move is to link them directly in the cheapest tree that touches them all — a minimum spanning tree, which you can find quickly and exactly.
But there's a twist that feels almost like cheating: you're allowed to add brand-new junction points that aren't towns at all — places where cables meet and split. Drop a junction in just the right spot and the total length shrinks. For three towns at the corners of a triangle, a single junction in the middle beats every spanning tree.
Those extra meeting points are Steiner points, and the shortest network using them is a Steiner tree. The catch: while the spanning tree is easy, finding the optimal Steiner tree — where to add junctions and how to wire them — is NP-hard.
Comments
Loading comments...