Hello,
I need help from this community, hoping that there is an experienced mathematician reading this post. I would like to calculate the probability distribution for the following problem: two numbers can change randomly with probability m from a given set of numbers of length a. For instance, they can get values from 1 to 6 like dices. In this case a=6. So what is the probability that after v trials the numbers reach a couple of target numbers? This is simple if m=1, that is, if the numbers change at every trial. In that case, the probability for any number to be the right one is p=1/a. On a given unsuccessful trial either both numbers are false or one of them right and the other false. So before both numbers are correct with probability p^2 on trial v, there were v-1 unsuccessful trials. So we have
P[v_] := ((1 - p)^2 + 2 (1 - p) p)^(v - 1) p^2
Now if m<1 one would expect that p=m/a with the same distribution than above, but this is far from being the case, as numerical results show. I used the following code to get these numerical results:
z = 10^3; Do[e[i] = 0, {i, 0, 10^7}];
a = 6; t = 2; target = {2, 5};
Do[
v = 0; parent = RandomInteger[{1, a}, t];
While[parent != target,
v = v + 1;
Do[
mutate = RandomInteger[{1, 20}];
If[mutate == 1, parent[[i]] = RandomInteger[{1, a}]],
{i, 1, t}]];
e[v] = e[v] + 1,
{z}]
For big z, the quantity e[v]/z tends to the probability P(v) and m=1/20 (mutate). I found an exact analytical solution, but it is horribly complicated. I would need several pages to explain it here. This is why I wonder if there is not a simpler solution. I am sure that this calculation has already been made and is written down in some book. Has anyone an idea?