Closed form version of partition and combination problem

69 Views Asked by At

We have an original set of n integers, $0, ... , (n-1)$. From these integers generate a set of $k$-tuples, with repetition where order does not matter. From this, want to know the probability that any two tuples will have the same sum.

I have attempted to go about this using partitions and working backwards. The range of possible sums goes from $0$ to $nk$. The brute force method I thought of was to go through each sum, generate each possible partition (limited by $k$ pieces of $n$ size), and count how many partitions are possible with these bounds for each sum. I have various equations, but I run into a few issues. Namely, with partitions, I have found recursive equations for counting $p(n,k)$, where the size of of the partitions is bounded, but I cannot find a closed-form version of this that includes a bound on the size of the pieces. I have found Ferrer's graphs and a way to bound pieces that way, but I am not sure how to put this all together.

(I have also done this analytically in py3, generating the list of combinations-with-replacement, determining all of their sums, and from there counting exactly how many all share the same sum. I can't post the image because I don't have enough rep, but it actually resulted in a normal curve.)

I have no idea if the way I am going about this is correct. I am a computer science student, and I am seeking a closed-form solution for the probability of two tuples having the same sum based on $n$ and $k$. Thanks!