EDIT: There was a point that I had misunderstood and hence modifying the question slightly. The boundary at $N$ is sticky, not bouncing. The boundary at $1$ is a bouncing boundary.
How do we calculate the number of walks that would reach a value $N$ given that:
- There are three operations with identical probability of occurrence: $\{+1, 0, -1\}$ , i.e., a right $(r)$, pause$(p)$ and a left $(\ell)$ if we consider the 1-d as the positive x-axis.
- The total number of operations in the walk is fixed as $K$.
- The walk starts at $1$ and cannot go less than $1$ or greater than $N$, i.e., it is bounded on both ends. A walk that reaches $N$ with more operations remaining can do $p$ operations only, i.e, it is a sticky boundary. However $1$ is a bouncing boundary.
Basic combinatorics says that the number of walks ignoring bounds will be $$\sum_p \frac{(\ell + r + p)!}{\ell! r! p!}$$ where $p$ ranges from $0$ to $K-N$, $\ell+r+p = K$ and $r-\ell = N$, but this will have many walks that go beyond the boundaries. I am unable to proceed further.
In other words, this is the number of ordered sets of cardinality $K$ from the alphabet $\{1, 0, -1\}$ which have a total sum of $N$ and any sum of a "prefix-subset" of elements is positive.
I am trying to find a closed form solution for the number of walks but unable to do so.