## question on set theory

Please help me in solving the following question How many nonempty subsets of {1, 2, 3 . . . 12 } have the property that the sum of the largest element and the smallest element is 13?

## Let the smallest number be 1

Let the smallest number be 1 then the largest number will be 12.
Now we have to find all the possible subsets with above two numbers and including/excluding numbers from 2 to 11(10 numbers).
If we take the smallest number as 2 then the largest number will be 11.
Here the subsets can contain numbers from 3 to 10 with above two numbers (8 numbers).
Let be more generic and consider the smallest number to be n then largest number will be 13-n. The remaining elements of the sub set can chosen from 12 â€“2n different elements. n + 1, n + 2 , . . . (13 - n)
Thus the total number of possible sets are 12^{12-2n}
And n ≤ 7 as anything more than n=6 will have duplicate values.
So the answer is 2^{10} + 2^{8}+ . . . +2^{0} = 1365