2

Suppose a tank has a maximum limit of 100 units. Each day 2,1 and 0 units are added to the water level with probability p,r and q. Any excess water would overflow and if it reaches the minimum level of 0 then it cannot be filled again.At the end of the day 1 unit is released from the tank. I tried to solve this the following way.

Let L be the random variable corresponding to the water level at the end of the day. $$Pr[L=k+1]=p, Pr[L=k]=r,Pr[L=k-1]=q$$ Let $q_k$ be the probability that the water level will become 0 if, at the beginning of the day the water level is k. Then, $$q_k=pq_{k+1}+rq_k+qq_{k-1}$$

Solving this by difference equations I got the following general solution $$q_k=A+B(q/p)^k$$

To determine A and B I need suitable boundary conditions. Should I use $q_{99}=0$ or $q_{100}=0$? I think the tank can never be at 100 water level at end of any day so $q_{99}=0$?

Also the recurrence formula I have written for $q_k$, should it be for k values between 1 and 99 or 1 and 98? ANy help will be much appreciated.

Heisenberg
  • 3,387
  • Hi @Heisenberg. What happens when the tank fills besides overflow? Does the process stop then or continue so that the only way the process stops is for the tank to be empty? Also, you don't say what you are try to find. I guess you want the probability that the tank will be empty before it fills to the top but can you clarify? Thanks. – Mick A Jul 08 '14 at 13:44
  • @MickA Process only stops when the tank it empty otherwise it will keep filling or reducing according to the given probabilities. I just want the probability that the tank will get empty when you start from say k units – Heisenberg Jul 08 '14 at 18:08
  • The tank will eventually become empty. Do you want the probability the tank empties after certain number of days? – gar Jul 08 '14 at 18:17
  • I want to find $q_k$ as mentioned above. Think of this as a gamblers ruin sort of a problem – Heisenberg Jul 08 '14 at 18:34
  • Gambler's ruin when modelled as a markov chain has two absorbing states, so the question of probability makes sense there. But for your problem, there is only one absorbing state, the probability is 1. Would you like to modify the question? E.g. finding expected no. of days to empty? The expression will be huge anyway. – gar Jul 09 '14 at 04:25
  • @gar Then we can impose an absorbing barrier when the tank is full as well and proceed – Heisenberg Jul 09 '14 at 05:20

1 Answers1

1

It can be written as a markov chain to obtain the probabilities. But there are 101 states and couldn't find a simple closed form like in the case of the original gambler's ruin.

If the limit was 5 units instead, the markov chain is written as:

\begin{align*} A &= \left(\begin{array}{rrrrrr} r & q & 0 & 0 & 0 & p \\ p & r & q & 0 & 0 & 0 \\ 0 & p & r & q & 0 & 0 \\ 0 & 0 & p & r & q & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \end{array}\right) \end{align*} where the states are written in order $q_4,q_3,q_2,q_1,q_0,q_5$

and the probabilities of absorption can be found by computing $\left(I-Q\right)^{-1} \cdot R$ where

\begin{align*} I = \left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array}\right), Q = \left(\begin{array}{rrrr} r & q & 0 & 0 \\ p & r & q & 0 \\ 0 & p & r & q \\ 0 & 0 & p & r \end{array}\right), R = \left(\begin{array}{rr} 0 & p \\ 0 & 0 \\ 0 & 0 \\ q & 0 \\ \end{array}\right) \end{align*}

The same pattern can be extended to the limit of 100. For particular values of $p,q,r$, any CAS can get the probabilities within a second.

Also, this may be of interest: Find the ordinary generating function $h(z)$ for a Gambler's Ruin variation.

gar
  • 4,988