Question: 3.8 Define the relation subset(Set, Subset) where Set and Subset are two lists representing two sets. We would like to be able to use this
3.8 Define the relation subset(Set, Subset) where Set and Subset are two lists representing two sets. We would like to be able to use this relation not only to check for the subset relation, but also to generate all possible subsets of a given set. For example: ?- subset( [a,b,c], S). S = [a,b,c]; S = [a,b]; S = [a,c]; S = [a]; S = [b,c]; S = [b];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
