Question 1210228
<br>
The AI solution from the other tutor doesn't show the details of how the answer was obtained using a recursive formula.  I didn't try to solve the problem using that process; and my answer is different than his.<br>
We want a subset for which the sum of the elements is a multiple of 5 -- i.e., for which the sum is equal to 0 mod 5.<br>
Here are the elements and the mod 5 equivalents of each:<br><pre>

   n   n mod 5
  -------------
   1    1
   3    3
   8    3
   17   2
   30   0
   36   1
   47   2
   58   3</pre>
Two things to notice before we start finding the subsets for which the sum of the elements is a multiple of 5:<br>
(1) 30 itself is a multiple of 5.  So for any subset we find for which the sum of the elements is equal to 0 mod 5, we can add the element 30 to that subset to find another such subset.
(2) The sum of all the elements of the given set is a multiple of 5.  So for any subset we find for which the sum of the elements is a multiple of 5, the complement of that subset is another such subset.  Note, however, that each such complement might be a subset we have already found.<br>
We now find "basic" subsets for which the sum of the elements is a multiple of 5; then for each such subset we form a second subset by adding the element 30; then for each of those subsets we find the complement of that subset as another subset for which the sum of the elements is a multiple of 5 -- EXCEPT if the complement is a subset we have already found.<br>
Basic subsets with 0 elements....<br>
The empty set { } is the only subset with 0 elements.  We can then add the element 30 to get a second subset {30}; then the complement of each of those sets is another subset.<br>
Number of subsets for which the basic set has 0 elements: 4<br>
Basic subsets with 2 elements....<br>
There are no elements of the given set that are equal to 4 mod 5, so these subsets will each contain one element equal to 2 mod 5 and a second element equal to 3 mod 5.<br>
There are 2 elements equal to 2 mod 5 and 3 equal to 3 mod 5.  Any of the 2 elements equal to 2 mod 5 can be paired with any of the 3 elements equal to 3 mod 5, giving 6 basic subsets of this type:<br>
{17,3}, {17,8}, {17,58}, {47,3}, {47,8}, {47,58}<br>
To each of these 6 basic subsets we can add the element 30 to get another subset; and the complement of each of those two subsets will be another subset.<br>
Number of subsets for which the basic set has 2 elements: 6*2*2 = 24.<br>
Basic subsets with 3 elements....<br>
To get a basic subset with 3 elements, we can have the mod 5 equivalents of the 3 elements be either 1,1,3 or 1,2,2.<br>
The 1,1,3 case....
There are 2 elements equal to 1 mod 5 and 3 elements equal to 3 mod 5. The two elements equal to 1 mod 5 can be combined with any of the 3 elements equal to 3 mod 5, giving three 3 basic subsets of this type:<br>
{1,36,3}, {1,36,8}, {1,36,58}<br>
To each of these basic subsets we can add the element 30 to get another subset; and the complement of each of those two subsets will be another subset.  So the number of subsets for this case is 3*2*2 = 12.<br>
The 1,2,2 case....
There are 2 elements equal to 1 mod 5 and 2 equal to 2 mod 5.  Each of the elements equal to 1 mod 5 can be combined with both of the elements equal to 2 mod 5, giving 2 basic subsets of this type:<br>
{1,17,47}, {36,17,47}<br>
To each of these basic subsets we can add the element 30 to get another subset; and the complement of each of those two subsets will be another subset.  So the number of subsets for this case is 2*2*2 = 8.<br>
Number of subsets for which the basic set has 3 elements: 12+8 = 20.<br>
Basic subsets with 4 elements....<br>
To get a basic subset with 4 elements, we can have the mod 5 equivalents of the 4 elements be either 1,3,3,3 or 2,2,3,3.<br>
The 1,3,3,3 case....
There are 3 elements euqal to 3 mod 5 and 2 equal to 1 mod 5.  The 3 elements equal to 3 mod 5 can be combined with either of the 2 elements equal to 1 mod 5 to form a subset, giving us 2 subsets of this type:<br>
{1,3,8,58}, {36,3,8,58}<br>
Each of these subsets contains 4 elements, so we can't add the element 30 to the subset or take its complement, because doing either will give us a subset we have already counted.  So there are 2 subsets of this type.<br>
The 2,2,3,3 case....
There are 2 elements equal to 2 mod 5 and 3 equal to 3 mod 5.  The two elements equal to 2 mod 5 can be combined with any 2 of the 3 elements equal to 3 mod 5 to give us a subset, giving us 3 subsets of this type:<br>
{17,47,3,8}, {17,47,3,58}, {17,47,8,58}<br>
As with the 1,3,3,3 case, we can't get new subsets by adding the element 30 or by taking the complement.  So there are 3 subsets of this type.<br>
The total number of subsets for which the sum of the elements is a multiple of 5 is the sum of the numbers for all the above cases: 4+24+12+8+2+3 = 53<br>
ANSWER: 53<br>