Split a restaurant bill so that one group pays an exact amount. Choose receipts that sum to a figure for the accountant. Pick coins from your pocket that total exactly a price. Each is the same tiny puzzle: from a set of numbers, is there a subset that adds up to an exact target?
That's Subset Sum, perhaps the most stripped-down of all the hard problems. No weights and values like knapsack, no graph, no logic — just numbers and a target. And yet, hidden inside that plainness is genuine, NP-complete difficulty.
Checking a proposed answer is instant; finding one can mean sifting through an exponential number of subsets.
Comments
Loading comments...