> What's the most efficient algorithm you can write to do this? As it turns out, you can't do well in the worst case — and we'll prove this by a reduction from SAT.
Correction: you can't do well in the worst case, assuming P ≠ NP (where "well" means "in polynomial runtime").