A subset is determined uniquely by deciding, for each of the elements, whether to include it. Each decision has two possibilities. By the rule of product, there are decision strings. The correspondence between such binary strings and subsets is a bijection, so . The all-zero string corresponds to the empty subset.
For , choose an ordered list of distinct elements: there are such lists. Every -element subset occurs in exactly orders, the number of permutations of its elements. Thus the count is the binomial coefficient
For fixed and , every numerator factor lies between and . Consequently
The constants depend on the fixed , not on . These inequalities prove in big theta notation. More precisely, dividing the product by gives the fixed-cardinality binomial coefficient asymptotic . For , there is exactly one empty subset, and the assertion is .
For , choose the first elements of . Every sum of a subset has a unique binary representation, so distinct subsets cannot have the same sum. To see this directly, take the largest power of two belonging to exactly one of two proposed subsets. It exceeds the sum of all smaller powers, and therefore cannot be cancelled by their difference. Thus these chosen sets are dissociated sets and do not have the two-sum property.
If cardinality zero is included, the empty set has only one subset, so it cannot supply two distinct ones either. There is a counterexample at every cardinality from through .
Fix any seven-element subset . Its power set supplies pigeons. Map each subset to its integer sum. Since the elements are positive, all such sums lie between and . The latter is at most the sum of the seven largest available elements,
There are therefore at most possible sums, fewer than the subsets. The pigeonhole principle forces two distinct subsets to have the same sum. Every seven-element subset has the two-sum property. This is the subset-sum pigeonhole bound. The weaker estimate would also suffice, since .
The number is
A direct search over every -element subset must inspect candidates. Testing one candidate by generating its subset sums creates values; storing previously seen sums detects a collision. Generating them incrementally needs arithmetic operations, or for the straightforward independent calculation of each sum. Thus the simple overall search has cost on the scale of , apart from integer-arithmetic and data-structure costs.
The important time complexity distinction is that fixed gives polynomial growth in , of degree , but this can still become impractically large. If increases with , both the candidate count and the internal power set can grow exponentially. For example, near the binomial coefficient is already exponentially large. An exhaustive implementation can therefore encounter a combinatorial explosion; the fixed- estimate must not be described as exponential in .

Articles by others on the same topic (0)

There are currently no matching articles.