Condition for stability of the tower

62 Views Asked by At

We have a tower made of $N$ blocks. With each new turn, tower can lose $N_1$ blocks with probability $p_1$, lose $N_2$ blocks with probability $p_2$, lose all the blocks it has with probability $p_3$, or don't lose any blocks at all. Also, each turn, $A$ blocks are added (if needed, because the tower can't have more than $N$ blocks). Tower is considered stable if it has $B$ or more blocks for 80% of time. We need to find $A$.

Solving reccurence relation $$S(1)=N$$ $$S(n)=(1-p_3)*S(n-1)+A-p_1N_1-p_2N_2$$

gives

enter image description here

Thus as n goes to infinity, $$S(n)→(A-p_1N_1-p_2N_2)/p_3$$ Then the tower is stable if $$A⩾p_3*B+p_1*N_1+p_2*N_2$$

Is it correct? I feel like something is wrong because I didn't use the fact that the tower can't have more than $N$ or less than 0 blocks.

[edited]: I've tried to use Markov chain, but now I have problems with interpreting the results. Here I have 5 states:

  1. the tower has $N$ blocks
  2. the tower loses $N_1$ blocks and gains $A$ blocks
  3. the tower loses $N_2$ blocks and gains $A$ blocks
  4. has lost all the blocks
  5. gains $A$ blocks

    enter image description here

Seems like my equilibrium state is [1 1 1 1 1], those with the eigenvalue 1.