2D Path probability calculation 
On the $x,y$ axis a random walker can walk only in a rectangle whose corners are $(0,0)$ and $(r, k)$. We start from $(0,0)$. Each time, we flip a fair coin, and decide to go to $(x+1,y)$ or $(x,y+1)$, from point $(x,y)$. If we hit a border and the coin flip says to pass the grid we do not do anything and flip again. We continue like this until we reach the other corner $(r,k)$. What is the probability that we traversed the path $D_i$? 

Note that probabilities of traversing paths are different. For instance, if $(r,k)=(3,3)$, the path $U,U,U,R,R,R$ has the highest probability ($U$ and $R$ stand for up and right). This is true since this path means the random walker has had the maximum number of opportunities to pass the borders but flipped coins until found a route inside of the grid to reach point $(3,3)$. What is the probability of a general path?
I feel like it should be in the literature. 
 A: The last move is always forced, as is the previous move if it's the same, as is the previous move before that if it's the same, and so forth.  For instance, if $(r, k) = (4, 3)$, then in the sequence $RUURURR$, the last two $R$'s are forced, but the others aren't.
Therefore, for any sequence, remove the longest suffix containing only one direction (either $R$ or $U$).  If the remainder has length $k$, the probability associated with the entire sequence is $1/2^k$.

For instance, for the case of $(r, k) = (3, 3)$ given in the OP, the probabilities are
$$
\begin{array}{|c|c|} \hline
\text{sequence} & P(\text{sequence}) \\ \hline
\underline{RRR}UUU & 1/8 \\ \hline
\underline{RRUR}UU & 1/16 \\ \hline
\underline{RRUUR}U & 1/32 \\ \hline
\underline{RRUUU}R & 1/32 \\ \hline
\underline{RURR}UU & 1/16 \\ \hline
\underline{RURUR}U & 1/32 \\ \hline
\underline{RURUU}R & 1/32 \\ \hline
\underline{RUURR}U & 1/32 \\ \hline
\underline{RUURU}R & 1/32 \\ \hline
\underline{RUUU}RR & 1/16 \\ \hline
\underline{URRR}UU & 1/16 \\ \hline
\underline{URRUR}U & 1/32 \\ \hline
\underline{URRUU}R & 1/32 \\ \hline
\underline{URURR}U & 1/32 \\ \hline
\underline{URURU}R & 1/32 \\ \hline
\underline{URUU}RR & 1/16 \\ \hline
\underline{UURRR}U & 1/32 \\ \hline
\underline{UURRU}R & 1/32 \\ \hline
\underline{UURU}RR & 1/16 \\ \hline
\underline{UUU}RRR & 1/8 \\ \hline
\end{array}
$$
Note that all $\binom{6}{3} = 20$ possible sequences are covered, and the probabilities sum to $1$.
