Mathematics (JEE)HardCodeforces Div2 C

How many subsets of {1, 2, ..., 8} (including the empty set) contain no two distinct elements whose sum is 9?

  1. A. 256
  2. B. 80
  3. C. 162
  4. D. 81

Correct answer: D. 81

The pairs with sum 9 are {1,8}, {2,7}, {3,6}, {4,5}; each pair contributes 3 choices (neither, first, or second), so 3^4 = 81.

More Permutations, Combinations and Probability questions

Exams that ask this topic