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
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];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
