Imagine a museum where hallways connect rooms, and you want to post guards so that every hallway has a guard at one of its ends. Each guard watches all the hallways touching their room. What's the fewest guards that watch everything?
Turn rooms into nodes and hallways into edges, and you have the vertex cover problem: choose the smallest set of nodes so that every edge has at least one endpoint chosen. It shows up wherever you must "watch", "guard", or "hit" every connection using as few points as possible.
Picking some cover is easy — just take every node. Picking the fewest is where it turns into one of the classic hard problems.
Comments
Loading comments...