Let n be a positive integer, and consider the set of integers {a1,a2,…,an} where each ai is an element of the set {0,1,2,…,2n−1}. We associate each subset of this set with the sum of its elements, and the empty subset is associated with the sum 0.
A set {a1,a2,…,an} is defined to be n-complete if all possible sums have distinct remainders when divided by 2n.
### Problem Analysis
For an n-complete set, each of the 2n possible sums of subsets corresponds to a distinct remainder when divided by 2n. Therefore, it must cover all remainders from 0 to 2n−1.
#### Step 1: Counting Subsets
There are 2n subsets of a set with n elements, including the empty subset. Each subset sum must have a unique remainder when divided by 2n.
#### Step 2: Remainder and Full Rank Condition
The requirement for distinct remainders implies a linear independence condition on the binary representations of a1,a2,…,an when viewed as n-bit vectors. The sum of subsets can be thought of as linear combinations of these vectors.
For linear combinations to result in distinct sums modulo 2n, the set of vectors must be linearly independent over Z/2Z. This means the binary matrix formed by the vectors has full rank n.
#### Step 3: Calculating the Number of Sets
The number of n-complete sets thus corresponds to the number of ways to select n linearly independent vectors over the field Z/2Z (a dimension n vector space). This is known to be 2n(n−1)/2. Each selection of vectors corresponds directly to an n-complete set.
### Conclusion
Therefore, the number of n-complete sets is:
2n(n−1)/2
This completes the solution process for determining the number of n-complete sets as defined in the problem.