Please imagine a discrete random walk on a one-dimensional lattice. The lattice consists of a set of $L$ positions, $(x_0, x_1, ..., x_L) \in L$, where $x_0$ is the initial position of the walk (as well as a reflecting boundary), and $x_L$ is absorbing. For each position in the walk, we assign one of $N$ jump probabilities (forward, $p_k$, backward, $(1-p_k)$) from a set $P$, where $(p_1, p_2, ..., p_N) \in P$. For the duration of the random walk, until the absorbing target $x_L$ is reached, what is the mean occupancy of the a given position in the one-dimensional lattice, $x_k$? I'm hoping to find an efficient method to compute an exact solution.