I have subsets formed from a list using the Subsets
command and want to do a particular calculation, lets say subtraction using the Subtract
command only with the sets I want.
For example,
m = {4, 5, 3, 2, 8};
Subsets[m, {2}]
{{4, 5}, {4, 3}, {4, 2}, {4, 8}, {5, 3}, {5, 2}, {5, 8}, {3, 2}, {3, 8}, {2, 8}}
From this list first I want to take the subsets that contains 4 and do subtraction. Then I want to take all subsets that contain 5, including {4,5}
and do subtraction and so on.