Markov chain for in-flow and out-flow of mass? I think the problem that I'm dealing with has some connections to Markov chain, second-order recurrence equation, and flow of mass. I was struggling to know with which keywords I should search for further references.
Suppose there is countable infinite number of toilets, of which position is denoted by $s = \{ -L, ..-1, 0,1,...,\infty \}$. At each period in discrete time, the probability of moving to one-step forward is given by $p^{up}$ and to one-step behind is $p_{down}$. When customers reach $s=-L$, they stay there forever. Lastly, at each period, customers die exogenously with some probability $D$, regardless of their position (including $-L$). When customers die, new customers replace them coming at $s=0$.
Given this structure, suppose at the first period, $M \in R^{+}$ of customers come into the chain of toilets at $s=0$.
With this simplified example, I would like to know the followings:
(1) when time goes to infinity, I speculate that the stationary fraction of customers at each position with resect to the total number of customers $M$ exits and that it equals to the stationary distribution from a corresponding Markov chain multiplied by $M$.
(2) I could write the flow changes of mass at each position. Given the stationarity condition that the flow change is $0$, I could get second-order relation condition except for $s = -L$ and $s=0$. However, the initial condition seems a bit odd (it doesn't start from the lowest index) and I was wondering if I can get even a closed-form solution of the stationary fractions.
 A: Firstly, let us assume that the customers don't die and that we have only one customer. Then, you have a semi-infinite absorbing Markov random walk. That is, your customer walks through the states $$-L, -L+1, \dots, 0, 1, \dots$$ From the properties of the Markov walk we know that this process is recurrent - that means that the probability of returning to the starting state is equal to $1$ - only if $p_{up}=p_{down}$. So for any $p_{down} \leq p_{up}$ the customer will end up in the absorbing state $-L$ with probability one.
Now, let us reintroduce dying. However, instead of thinking that our customer dies and a new customer at $s=0$ shows up, we can think of our consumer teleporting from its state to $s=0$. That means that regardless of where the customer is, there is a probability $D$ that they will start over. Now, even when $p_{up} > p_{down}$, at any time the customer can land in $-L$ in a finite number of steps. More formally, at any time there is a probability $p$ that the consumer lands in $-L$ in exactly $L+1$ steps equal to:
$$p = d\cdot (p_{down})^L$$
That means that after a sufficient number of restarts, any customer will eventually end up in $-L$. So, answering directly to the first question, after a sufficient finite number of turns, all $M$ customers will be in $-L$ regardless of the values $p_{down}, p_{up}, D$, assuming that $p_{down}$ and $D$ are positive.
Now, to comment on the second part, you can generate the transition matrix of the process. Assuming $p_{up}+p_{down}+D = 1$, the row corresponding to a state $i$ in the matrix $M$ will have three nonzero elements:
$$M_{i, i+1} = p_{up}$$
$$M_{i, i-1} = p_{down}$$
$$M_{i, 0} = D$$
The above won't be true only when we consider the row corresponding to $-L$, as it will have only one nonzero entry equal to $1$, and for states $-1$ and $1$, where you need to add the respective probability values. Let $v$ be an infinite vector having only one nonzero entry equal to $1$ on the position corresponding to the state $0$. Then, the probability that a customer is in the state $i$ after exactly $n$ turns is equal to:
$$(M^n\cdot v)_i$$
This allows you to calculate mass out- and in-flows, as the change in mass in the state $i$ between turn $n$ and $n+1$ is equal to
$$((M^{n+1} - M^{n})\cdot v)_i$$
While the above matrices are infinite, you can easily approximate them with sufficiently long finite random walk transition matrices.
