IDNLearn.com is the perfect place to get detailed and accurate answers to your questions. Discover reliable answers to your questions with our extensive database of expert knowledge.

given a set of integers, does any non-empty subset of them add up to zero? That is a decision problem and happens to be NP-complete?

Sagot :

no because the subset sum problem is a decision problem in computer science. In its most general formulation, there is a multiset S of integers and a target sum T, and the question is to decide whether any subset of the integers sum to precisely. the problem is known to be NP-complete. moreover, some restricted variants of it are NP-complete too, for example.