Friday 6 November 2020

Falling boxes

Imagine you have an inifnity tower of 1 cubic meter blocks. Each block is quite fragile, and each time the block falls a meter, it has a chance of pp to be disintegrated. If you knock away the bottom block, for what value of pp does the expented number of remaining block become finite, when we keep in mind that if a block desintigrates, the blocks above it will fall 1 meter further.

Let us number the blocks from 0 to infinity, starting at the bottom, it is easy to see that block zero has a 100% chance to be problen, and the chance to break block 1 equals pp, but block 2 is already harder. Each block is defined to have a chance of 1(1p)n1-(1-p)^n to break, if nn is the number of broken blocks before it (except for 0), but this means that all the chances are dependant on each other, and thus that calculating the chances individually is quite the impossible task. One might decide to use the expected value of broken blocks instead of the actual value, but as the system is not lineair, this will not give the correct result.
It might be smarter to only number the blocks that actually break. As there are infinite boxes with each a finite chance to break, the total number of boxes broken will almost always be infinity.

After every broken box, we can calculate the expected number of unbroken boxes, as the chances only depend on the broken boxes that come before, and not the unbroken ones, this is lineair and we can sum all these expected values.

So, after the nn-th broken box, what is the expected value of unbroken boxes before the next broken box? As the chance to break is 1(1p)n1-(1-p)^n, we can make the argument that the expected value given that the first box survives is one more than the expected value. Additiionally, the expected value also equals the chance the first one survives times the expected value given the first one survives, plus the expected value if the first both does not survive times the chance, which is zero.
So
(En+1)((1p)n)+0=En(E_n + 1)((1-p)^n) + 0 = E_n
This can be simplified to
En((1p)n)+((1p)n)=EnE_n((1-p)^n) +((1-p)^n) = E_n
En=(1p)n1(1p)nE_n = \frac{(1-p)^n}{1-(1-p)^n}
And thus the total expected value is
E=n=1(1p)n1(1p)nE = \sum_{n=1}^\infty \frac{(1-p)^n}{1-(1-p)^n}

This sum equals
ψ1p(0)(1)+log(p)log(1p)\frac{\psi^{(0)}_{1-p} (1) + \log(p)}{\log(1-p)}
when pp is nonzero. When pp is zero, the expected value obviously equals infinity, but whenever there is a tiny chance that a block will break, all but a finite subset of them will.