avik26091998's blog

By avik26091998, history, 6 years ago, In English

Can anybody provide me an optimized approach on how to find the sum of all subsets of a set. suppose my set is {a, b, c}. So subsets are — {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c}. I want to find a + b + c + (a + b) + (a + c) + (b + c) + (a + b + c). Thanks in advance.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Let there be n elements. For each of the n elements in the set, there are 2n - 1 subsets that include that element. Therefore if you take that is your answer.