I have following problem. I have set of objects, there is N objects. These object might join with each other. Two objects might join with probability $p_{join}$. In every computations step I take all possible couples of objects and put them into queue. For each couple from the queue I draw a number (from (0...1)) if number is smaller than $p_{join}$ then I join these two objects, I get one object and I do not use these connected objects in computations any more (so if object belongs to different couple that I have in queue for computation I discard this couple). This new object will be used in computation in the next step (but not in the current one).
I need equation (it might be some recurrence equation) for the number of connected objects in one step (at the beginning I have N object and I want to know how many of them joined after one step). I also need equation of probability of the event that tow objects join with other.
Currently I try to count it in the following way, however I'm unable to create one coherent equation:
$p_{N} = (1-(1-p_{join})^{N-1}$ At the beginning I have N objects I count possibility that object N do not connect with any other object $1-p_{j}^{N-1}$ and then I subtract it from $1$ in order to get possibility that N will join with something.
$p_{N-1} = p_{N}(1-(1-p_{join})^{N-3}) + (1-p_{N})(1-(1-p_{join})^{N-1})$ Then I take object $N-1$, depends on this what happened with object N I have $N-1$ (if object N did not join with other object) or $N-3$ (if object N join with something, then it removed two objects from set of objects and I do not have $N^{th}$ object and some other object)
$p_{N-2} = p_{N}p_{N-1}(1-(1-p_{join})^{N-5}...$
All object are the same and not recognizable.
Example for 4 objects (for convenience we introduce A B C D as a representation of objects (but all object are the same and there is no possibility to recognize them so these names are introduced just for clarity of example): At the beginning I take A object then I have three couples (AB AC AC) so three times I draw number (float value) (0...1) and compare with $p_{join}$. If any of this drew numbers is smaller than $p_{join}$ then I assume that A connected with some other object for example D. Then I take next strand that is still free. It will be B, now if A connected with other strand (for example D) I have only one couple to check BC, if A did not connected with other strand then I have to check couples BA, BC and BD. For C if A and B connected with other objects then C is connected so I have $0$, if A did not connect but B connected I can connect C with A, and if A and B did not connect I can connect C with A B or D. Etc.
so it is getting more and more complicated.