
Absorption probability of a finite-capacity allocation
Source:R/ledger_scan.R
morie_ruin_probability.RdA resource moves one unit at a time toward the first of two regions with
probability p, and stops when a region holds nothing or everything
(N). With \(\rho = (1-p)/p\), the probability of ending at zero from
\(k\) is \((\rho^k - \rho^N)/(1 - \rho^N)\), which solves the harmonic
equation \(p_k = p\,p_{k+1} + (1-p)\,p_{k-1}\) with \(p_0 = 1\),
\(p_N = 0\) (Research.P4.Ruin.ruin_harmonic, ruin_boundary) by
the de Moivre martingale \(\rho^{S_n}\) (deMoivre_step). At
p = 1/2 the formula is 0/0 and the answer is \(1 - k/N\)
(ruin_symmetric).