Phase 1: Connect the points — discover the cost of local greed

The Wiring Problem

Five points on a 2D plane. Each pair has a cost equal to the Manhattan distance — horizontal plus vertical. You need to connect all of them with minimum total wire.

The natural instinct is to be greedy: always wire each point to its nearest unconnected neighbor. It feels optimal. The edges are short. The total looks low. Let me show you what that produces.

I tried this on my first attempt. I was so confident. Then I saw the actual minimum. Five units of unnecessary wire that I could have saved with a different strategy.

FIG. 1 — NEAREST-NEIGHBOR GREEDY — 5 POINTS
01234