The subset sum puzzle

By 3Blue1Brown

Share:

Key Concepts

  • Subset Sum Problem: A computational problem in computer science and mathematics that asks whether any subset of a given set of numbers sums to a specific target value.
  • Pigeonhole Principle: A fundamental combinatorial principle stating that if $n$ items are put into $m$ containers, with $n > m$, then at least one container must contain more than one item.
  • Combinatorial Explosion: The rapid growth of the number of possible subsets as the size of the set increases.
  • Distinct Subsets: Subsets that are not identical in their composition of elements.

The Game Mechanics

The game involves a set of 10 numbers chosen from the range of 1 to 100. The objective for the player is to identify two distinct subsets within the chosen 10 numbers that result in the same sum. The game is framed as a strategic challenge between the presenter and the viewer:

  • Player's Goal: Prove that for any set of 10 numbers chosen from the range [1, 100], there must exist at least two distinct subsets with identical sums.
  • Presenter's Goal: Find a specific set of 10 numbers where no two distinct subsets share the same sum, thereby proving the player cannot win.

Mathematical Framework and Logic

The core of the puzzle relies on the relationship between the number of elements in the set and the number of possible subsets.

  1. Calculating Possible Subsets: For a set of $n$ elements, the total number of possible subsets is $2^n$. For a set of 10 numbers, there are $2^{10} = 1,024$ possible subsets (including the empty set).
  2. Range of Possible Sums: If the numbers are chosen from 1 to 100, the maximum possible sum of a subset of 10 numbers is the sum of the 10 largest numbers (91 + 92 + ... + 100), which equals 955.
  3. The Pigeonhole Principle Application:
    • There are 1,024 possible subsets.
    • The possible sums range from 0 (the empty set) to 955.
    • Since there are 1,024 subsets and only 956 possible sum values (0 through 955), the Pigeonhole Principle dictates that at least two subsets must map to the same sum.

The Strategic Conflict

The presenter challenges the viewer to determine if the Pigeonhole Principle guarantees a win for the player in every scenario. While the math suggests that 1,024 subsets distributed across 956 possible sums forces a collision (two subsets with the same sum), the complexity lies in whether the "distinct subsets" requirement is always met.

  • The Player's Perspective: The player relies on the mathematical certainty that the number of subsets exceeds the number of possible sums, making it statistically impossible to avoid a duplicate sum.
  • The Presenter's Perspective: The presenter implies that there may be a specific configuration of 10 numbers that defies this expectation or that the constraints of the game allow for a winning strategy for the chooser.

Synthesis and Conclusion

The puzzle serves as an application of the Pigeonhole Principle to combinatorial set theory. The fundamental takeaway is the tension between the number of available subsets ($2^n$) and the range of possible sums. Because $2^{10} > 955$, the mathematical framework strongly suggests that the player has the winning strategy, as it is impossible to assign 1,024 unique sums to a range of only 956 possible values. The challenge remains to verify if there are any edge cases or specific constraints that would allow the presenter to construct a set that avoids this outcome.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "The subset sum puzzle". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video