Probability Involving Summing the Number on the Balls Suppose three different balls will be randomly drawn without replacement from an urn containing nine balls, numbered $1$ through $9$. What is the probability that one of the three selected balls will be the one numbered $1$ given that the sum of the numbers on the three selected balls is $10$?
Attempted Solution:
The only cases where the three balls add up to $10$ are,
{$1,4,5$},{$1,3,6$}, {$1,2,7$}, {$2,3,5$}
Three of which have a one giving $p = .75$.
Is this a valid solution? Is there a way to generalize this for balls numbered $1$ through $n$ with $m$ balls selected, and finding the probability of selecting a ball that is numbered $x$, given that the sum is $s$? Just curious about the last part. I think it ties in with partitions, except partitions allows for repeated values.
 A: As you thought, this problem is related to partitions of an integer.
In particular, it is related to the partitions of an integer $s$
into $m$ distinct parts.
(The usual notation here seems to be "partitions of $n$ into $k$ distinct parts"; you can use that phrase as a query for a Web search.
But I'll use your notation below for consistency with the question.)
The number of partitions of $s$ into $m$ distinct parts is equal to the
number of partitions of $s - \frac{m(m-1)}{2}$ into $m$ parts,
not necessarily distinct.
There is a simple bijective mapping between the two sets of partitions:
given any partition of $s - \frac{m(m-1)}{2}$ into $m$ parts,
not necessarily distinct,
list the terms of the partition in non-increasing order, then
add $m-r$ to the $r$th part, $r = 1,2,\ldots,m.$
The result is a partition of $s$ into $m$ distinct parts,
listed in decreasing order.
For example, for $s=10, m=3,$ it follows that
$s - \frac{m(m-1)}{2} = 7$;
Observe that $(5,1,1)$ is a partition of $7$ in $3$ parts;
add $2$ to the first part, $1$ to the second part, $0$ to the third part,
and the result is $(5+2,1+1,1) = (7,2,1).$
Similarly, the partition $(3,3,1)$ maps to $(3+2,3+1,1) = (5,4,1).$
We can see that the mapping is bijective, because subtracting
$m-r$ from each $r$th part of a partition in $m$ distinct parts
(with the parts listed in decreasing order)
results in a partition in $m$ parts (not necessarily distinct)
with the parts listed in non-increasing order.
So whatever recurrences or generating functions you know for counting or generating partitions of an integer, you can apply them to counting or generating distinct partitions of an integer.
Your problem introduces the limitation that the largest part cannot be
more than $n.$ This can cause some difficulty, but only if
$n < s - \frac{m(m-1)}{2},$
since the $m-1$ smallest partitions must have a sum of at least
$\frac{m(m-1)}{2}$ and hence the largest partition is at most
$s - \frac{m(m-1)}{2}.$
In the case where $s - \frac{m(m-1)}{2} - n = d > 0,$
I think you can construct a bijective mapping between
partitions of a number into $m$ distinct parts and the partitions of $s$
into $m$ distinct parts, none greater than $n,$
similar to the mapping between partitions in $m$ parts and partitions in
$m$ distinct parts.
My thought on this are to let $h=\lceil d/(m-1)\rceil$
and $g = (m-1)h - d$; then for any partition of $s - d - h$
into $m$ distinct parts, add $h$ to the first $m - g$ parts and
$h-1$ to the last $g$ parts.
In any case, suppose you have found a suitable way to count the partitions
of $s$ such that each partition corresponds to a subset of size $m$
of the set of balls labeled $1$ through $n.$
If $x=1$ it is relatively simple to find how many of these subsets
contain the ball labeled $x$:
just find all partitions of $s - m$ into $m-1$ distinct parts,
no part larger than $n-1.$
Each of these partitions maps to one of the desired partitions
(containing a part of size $x=1$)
by adding $1$ to each part and then appending a part of size
$1$ to the partition.
For example, with $n=9,$ $s=10,$ and $m=3,$
the number of partitions of $s-m = 7$ into $m-1 = 2$ distinct parts
is $3,$ so there are $3$ subsets of the balls labeled
$1, 2, \ldots, 9$ such that the sum of the labels is $10$ and one of the
balls is labeled $1.$
If $x > 1$ the counting gets more complicated.
For example, with $x=2,$ there are the partitions of $s - 2$
in which all partitions are greater than $2$
(the number of these is the number of partitions of $s - 2m$
into $m - 1$ distinct parts),
but also the partitions of $s - 2$ in which one partition has size $1$
(which is the number of partitions of $s - 2m - 1$ into $m-2$ distinct parts).
In general, if you count partitions this way you could be counting up to
$2^{x-1}$ different sets partitions, depending on which of the numbers
less than $x$ is included in the partition.
A: i'm wondering how you obtained those 4 possible outcomes. i did not believe they were the complete number of outcomes, but they are.
suppose i have 10 cubes and 3 bags. i want to find the distinct number of ways in which I can distribute the 10 cubes into the 3 bags, such that 


*

*the first bag has only 1 cube, 

*each bag has a distinct number of cubes,

*each bag must have at least one cube.


so the second bag must have two or more cubes because each bag must have a different number of cubes. with similar logic, the third bag must have three or more cubes.
if the first bag must have exactly 1 cube, and the remaining bags have at least 5 cubes, that means we have 4 cubes remaining to distribute amoung the last two bags. the number of ways we can distribute those remaining cubes are 4! divided by 4, or 4 choose 2, minus duplicate outcomes. this is easy to produce by hand, and the number of outcomes is 3.
i used a similar method to count the number of ways the numbered balls can have a sum of 10, given that one of the balls is numbered 2. the result yielded 1 unique way in which it could happen.
3 + 1 = 4, and 3 out of those 4 ways include a ball numbered 1, so you have .75 as your answer. you were right.
