2

Selecting 10 numbers between 1 and 100 without replacement (i.e., such that the selected numbers are distinct from each other), what are the odds that some subset of those numbers add up to precisely 100?

If possible, more generally, selecting $x$ random numbers (for $x < y$) between $1$ and $y$ inclusive without replacement, what is the probability of some subset adding up to $y$?


Responding to comments: my motivation is to understand how likely a randomly-configured Subset Sum game is to have a solution in practice for given values of $x$ and $y$. Obviously for small $x$ and large $y$ the probability lowers. I'm curious about how the probability evolves over $x$ and $y$.

  • If $x = y$, then obviously there is always a solution as $y$ is in the set.
  • If $x = 1$, then the probability is $1 / y$ for there to be a solution.
  • If $x = y - 1$, for $y > 2$, there is always a solution as either $1$ and $y - 1$, or $y$, are in the set.
  • If $x = y - 2$, for $y > 4$, there is always a solution as either $2$ and $y-2$, or $1$ and $y - 1$, or $y$, are in the set.
  • (... if $x > y/2$, I guess there is always a solution)
  • If $x \leq y/2$, the probability for there being two values that sum to $y$ would relate to, for each value $n$ in the set, not having $y - n$ in the set. I think you would only need to multiply the probabilities for about half of the elements of the set given the symmetry (i.e., if you have considered $n$, you should not also consider $y-n$).
  • The probability of there being up to three values that sum to $y$ would be the sum of the probability of there being two values that sum to $y$, plus the probability of there being three values that sum to $y$ times the probability of there not being two values that sum to $y$.
  • And so forth.
badroit
  • 826
  • 2
    Maybe start with $x=1,x=2,x=3,...$ – Empy2 Jun 16 '24 at 08:11
  • 1
    If $x$ and $y$ are large, consider the size $z$ of the subset that sums to $y$. There are $x\choose z$ of these sums, which have mean $(y+1)z/2$ and variance $(y-1)^2z/12$. Find the $z$ which maximizes the probability one is in the interval $(y-1/2,y+1/2)$. Then estimate a value of $x$ for which that probability is $O(1)$ – Empy2 Jun 16 '24 at 11:31
  • 1
    See the answer to this question dealing with the same problem with a combinatorial point of view here by using generating functions. – Jean Marie Jun 16 '24 at 13:56
  • 1
    Any comment on my last comment ? Besides, what is your motivation for such a question ? Is it a homework ? – Jean Marie Jun 17 '24 at 14:37

0 Answers0