1. The problem statement, all variables and given/known data Let 0≤p≤1. Let there be k distinct numbers (they can be natural numbers) a1, a2, ... , ak, each repeating respectively b1, b2, ... , bk times. Let q < ∑r=1k br Determine the minimal values of b1 ... bk such that the probability of q numbers chosen out of ∑r=1k br numbers being exactly the same is p. Example : consider 1,1,1,1,2 . The probability that 2 numbers chosen out of the 5 is exactly the same is 6/10 2. Relevant equations The only ones I can come up with is h = ∑r=1k br and p = ∑r=1k qCb_r where q < br / qCh C stands for Combination , in contrast to permutation. 3. The attempt at a solution Technically this is not a homework assignment, but needed for a project where a software needs to generate pseudo-random numbers, with some properties. I notice that we have too many variables and just two equations. But a minimal solution should be possible. I personally am stuck, but it looks like I am missing / forgetting some basic properties of probability - with which this problem can be easily solved.. I could apply brute force. The example was generated via brute force. But I am sure a more formal solution is available. This is why I classify this as precalculus homework.. Please help. My background is Physics MSc - so don't hesitate to apply more advanced notation on the solution than precalculus, if needed,.