% m(1) = m, m(i) = N * (1 - (1 - 1 / N) ^ m(i - 1))
function ret = calc_success_probability(N, t, m)
arr = zeros(1, t - 1);
arr(1) = m;
for i = 2 : t - 1
arr(i) = N * (1 - (1 - 1 / N) ^ arr(i - 1));
end;
exp = 0;
for i = 1 : t - 1
exp = exp + arr(i);
end;
ret = 1 - (1 - 1 / N) ^ exp;
>> calc_success_probability(80603140212, 2400, 40000000) ans = 0.6055 |