# What is a subset sum problem?

+1 vote
237 views
What is a subset sum problem?

(a) finding a subset of a set that has sum of elements equal to a given number

(b) checking for the presence of a subset that has sum of elements equal to a given number and printing true or false based on the result

(c) finding the sum of elements present in a set

(d) finding the sum of all the subsets of a set

This question was posed to me by my college professor while I was bunking the class.

The origin of the question is Checksum, Complexity Classes & NP Complete Problems topic in division Checksum, Complexity Classes & NP Complete Problems of Data Structures & Algorithms II

+1 vote
by (962k points)
selected by

The correct option is (b) checking for the presence of a subset that has sum of elements equal to a given number and printing true or false based on the result

Best explanation: In subset sum problem check for the presence of a subset that has sum of elements equal to a given number. If such a subset is present then we print true otherwise false.

+1 vote
+1 vote
+1 vote
+1 vote