3.20 Define the predicate subsum(Set, Sum, SubSet) so that Set is a list of numbers, SubSet is...

Question:

3.20 Define the predicate subsum(Set, Sum, SubSet) so that Set is a list of numbers, SubSet is a subset of these numbers, and the sum of the numbers in SubSet is Sum. For example: ?- subsum( [1,2,5,3,2], 5, Sub). Sub = [1,2,2]; Sub [2,3]; Sub = [5];

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: