Counting discrete space, discrete time random walks that are always strictly positive.

47 Views Asked by At

Let $ \Theta \ge 1 $ and $n \ge 1 $ be integers. Consider integer sequences of length $n$ composed of entries each one running independently over the range ${\mathfrak R}_\Theta:=\left\{-\Theta,-\Theta+1,\cdots,-2,-1,+1,+2,\cdots,+\Theta-1,+\Theta \right\}$. Clearly the total number of such sequences reads $(2 \Theta)^n$. My question is the following: What is the number of sequences of that kind that have the property that all entries of the cumulative process are strictly positive. We will denote this number as ${\mathfrak B}_n^{(\Theta)} := \sum\limits_{x_1 \in {\mathfrak R}_\Theta} \sum\limits_{x_2 \in {\mathfrak R}_\Theta} \cdots \sum\limits_{x_n \in {\mathfrak R}_\Theta} \prod\limits_{i=1}^n 1_{\sum\limits_{\xi=i}^n x_\xi > 0} $.

Clearly one approach to this problem is to find the joint probability distribution of the cumulative process at all possible times and then , by using the integral representation of the Kronecker delta function do the sums over the entries as geometric series and express the sought after quantity as a multivariate integral over a hypercube. We have done that and produced the formula below:

\begin{eqnarray} {\mathfrak B}_n^{(\Theta)} &=& \frac{1}{\pi^n} \int\limits_{[0,2\pi]^n} \prod\limits_{i=1}^n \left[ e^{\frac{\imath}{2} \phi_i (1+(n-i+1) \Theta)} \frac{\sin(\frac{\phi_i}{2}(n-i+1) \Theta)}{\sin(\frac{\phi_i}{2})} \cdot \cos\left( \frac{1+\Theta}{2} \cdot \Phi_i\right) \cdot \frac{\sin(\frac{\Theta}{2} \Phi_i)}{\sin(\frac{1}{2} \Phi_i)} d\phi_i \right] \\ &=& \left( \begin{array}{cccc} 1 & 1 & 2 & 3 & \cdots \\ 2 & 5 & 17 & 58 & \cdots \\ 3 & 12 & 60 & 311 & \cdots\\ \vdots \end{array} \right) \end{eqnarray} where $\Phi_i:= \phi_1+\cdots+\phi_i$ for $i=1,\cdots,n$. In the second line above the rows are labelled by $\Theta \ge 1$ and the columns by $n \ge 1$.

The code below verifies the result:

(** Here the increments have 2 Theta discrete values : -Theta, \
-Theta+1,..,-2,-1, 1,2,....,Theta-1,+Theta **)
Theta =.;
Table[Sum[Product[If[Sum[x[xi], {xi, i, n}] > 0, 1, 0], {i, 1, n}], 
  Evaluate[Sequence @@ 
    Table[{x[xi], Join[Range[-Theta, -1], Range[1, Theta]]}, {xi, 1, 
      n}]]], {Theta, 1, 3}, {n, 1, 4}]
Table[1/(Pi)^(n) NIntegrate[
   Product[Exp[
      I/2 phi[i] (1 + (n - i + 1) Theta)] (Sin[
       phi[i]/2 (n - i + 1) Theta])/( 
      Sin[phi[i]/2]) Cos[ (1 + Theta)/2 Sum[phi[xi], {xi, 1, i}]] Sin[
      Theta/2 Sum[phi[xi], {xi, 1, i}]]/
     Sin[1/2 Sum[phi[xi], {xi, 1, i}]], {i, 1, n}], 
   Evaluate[
    Sequence @@ Table[{phi[xi], 0, 2 Pi}, {xi, 1, n}]]], {Theta, 1, 
  3}, {n, 1, 4}]

enter image description here

Now, if $\Theta=1$ (first row in the table) the problem in question is equivalent to the Bertrand's ballot theorem and admits a closed form solution $ {\mathfrak B}_n^{(1)} = \sum\limits_{q=0}^{\lfloor n/2 \rfloor} \binom{n}{q} (n-2q)/n $. As a matter of fact the Wikipedia website on that gives several proofs of that result one of which is particularly elegant because it uses the reflection principle.

Another application of this problem is to determine the probability distribution of the running supremum of a random walk. We know very well that this problem is solved so we suspect that the solution to this problem should exist as well.

In view of all this my question is can we find a closed form expression in the general case $\Theta > 1$. Another question would be can the Proof by reflection from the wiki page be generalized in this setting?

2

There are 2 best solutions below

0
On

Here is a partial answer to this question. Note the sought after quantity can be written as follows:

\begin{eqnarray} &&{\mathfrak B}_n^{(\theta)}=\\ && \sum\limits_{k_n=1}^\theta \sum\limits_{k_{n-1}=1\vee(k_n-\theta)}^{2 \theta \wedge (k_n+\theta)} \sum\limits_{k_{n-2}=1\vee(k_{n-1}-\theta)}^{3 \theta \wedge (k_{n-1}+\theta)} \cdots \sum\limits_{k_{\xi}=1\vee(k_{\xi+1}-\theta)}^{(n+1-\xi) \theta \wedge (k_{\xi+1}+\theta)} \cdots \sum\limits_{k_{1}=1\vee(k_{2}-\theta)}^{(n) \theta \wedge (k_{2}+\theta)} 1_{k_1 \neq k_2} \wedge 1_{k_2 \neq k_3} \wedge \cdots \wedge 1_{k_{n-1} \neq k_n} % \end{eqnarray} for $\xi = n,\cdots,1$.

The formula above has a following interpretation. We count all random walks where the partial sums $k_\xi:= x_\xi+\cdots+x_n$ are strictly positive , i.e. $k_\xi = 1,\cdots,(n+1-\xi)\theta$, and where the returns $x_\xi:= k_\xi - k_{\xi+1}$ are in the required range, i.e. $x_\xi \in {\mathfrak R}_\theta$.

Now, by evaluating the above for a fixed $n=1,2,3,\cdots$ and an arbitrary $\theta$ we discovered that the result is a polynomial of order $n$ in $\theta$. In other words we have:

\begin{equation} {\mathfrak B}_n^{(\theta)}= \sum\limits_{\xi=0}^{n-1} {\mathfrak A}_{n,\xi} \binom{\theta+\xi}{n} \end{equation}

where

\begin{equation} \left({\mathfrak A}_{n,\xi}\right)_{n=1,\xi=0}^{\cdots, n-1} = \left( \begin{array}{l} \{1\} \\ \{2,1\} \\ \{4,9,2\} \\ \{8,51,43,3\} \\ \{16,240,510,173,6\} \\ \{32,1030,4576,4056,691,10\} \\ \{64,4207,35141,64062,28978,2663,20\} \\ \end{array} \right) \end{equation}

In general:

\begin{eqnarray} {\mathfrak A}_{n,0} &=& 2^n \\ &\vdots& \\ {\mathfrak A}_{n,n-1} &=& {\mathfrak B}_n^{(1)} \end{eqnarray}

As always, the code below verifies the result.

(*In general*)
n =.;
mat = Table[
   Sum[If[And @@ Table[k[xi] != k[xi + 1], {xi, 1, n - 1}], 1, 0], 
    Evaluate[
     Sequence @@ 
      Table[{k[xi], Max[1, If[xi == n, -Infinity, k[xi + 1] - th]], 
        Min[(n + 1 - xi) th, 
         If[xi == n, Infinity, k[xi + 1] + th]]}, {xi, n, 
        1, -1}]]], {th, 1, 8}, {n, 1, 7}];
mat // MatrixForm

ll = {};
Do[
  th =.; res = 
   Simplify@
    InterpolatingPolynomial[Transpose[{Range[1, 8], mat[[All, n]]}], 
     th];
  tmp = Table[A[xi], {xi, 0, n - 1}] /. 
    Solve[CoefficientList[
       Sum[A[xi] Pochhammer[th + xi - n + 1, n]/n!, {xi, 0, n - 1}] - 
        res, th] == 0];
  ll = Join[ll, tmp];
  , {n, 1, 7}];
ll // MatrixForm

enter image description here

0
On

This is the full solution to the problem by means of analytical rather than combinatorial methods.

We take three integers $(\Lambda,n,\theta)$ such that $\Lambda \ge 2$ then $n\ge \Lambda+1$ and $\theta\ge 1$ and we define a following partial sum:

\begin{equation} {\mathfrak S}^{(\theta,\Lambda+1)}_n(k_{\Lambda+1}) := \underbrace{ \sum\limits_{k_\Lambda=1 \vee (k_{\Lambda+1}-\theta)}^{(n-\Lambda+1)\theta \wedge (k_{\Lambda+1}+\theta)} \sum\limits_{k_{\Lambda-1}=1 \vee (k_{\Lambda}-\theta)}^{(n-\Lambda+2) \theta\wedge (k_{\Lambda}+\theta)} }_{\Lambda \quad sums} \cdots \sum\limits_{k_{1}=1 \vee (k_{2}-\theta)}^{n \theta \wedge (k_{2}+\theta)} \prod\limits_{\xi=1}^{\Lambda} 1_{k_\xi \neq k_{\xi+1}} \tag{1} \end{equation}

where $k_{\Lambda+1} = 1,\cdots, (n-\Lambda) \theta$.

The sum in $(1)$ has a simple interpretation. It counts all the random walks of length $n$ such that their values at times $n,n-1,\cdots, n-\Lambda+1$ are strictly positive and its value at time $n-\Lambda$ is fixed and equal to $k_{\Lambda+1}$.

Now, it turns out that the sum in question has a following functional form:

\begin{equation} {\mathfrak S}^{(\theta,\Lambda+1)}_n(k_{\Lambda+1}) = \sum\limits_{p=0}^\Lambda \sum\limits_{\xi=0}^p \sum\limits_{q=0}^{\Lambda+1} {\mathfrak A}^{(\Lambda+1,q,\Lambda-p)}_\xi k_{\Lambda+1}^{\Lambda-p} \theta^\xi \cdot 1_{q \theta < k_{\Lambda+1} \le (q+1) \theta} \tag{2} \end{equation}

where the coefficients ${\mathfrak A}_\cdot^{(\cdot,\cdot,\cdot)}$ satify the following recurrence relations:

\begin{eqnarray} &&{\mathfrak A}^{(\Lambda+1,q,\Lambda-p)}_\xi = -{\mathfrak A}^{(\Lambda,q \wedge \Lambda,\Lambda-p)}_\xi \cdot 1_{p \ge 1} 1_{\xi \le p-1} + \\ && \sum\limits_{k_\Lambda=0}^{(\Lambda-1)\wedge p} \sum\limits_{\eta=0 \vee (\xi-\Lambda+k_\Lambda) \vee (\xi-p)}^{k_\Lambda} \sum\limits_{\eta_1=0 \vee (\xi-\Lambda+k_\Lambda) \vee (\xi-p+k_\Lambda)}^{\eta \wedge \xi} % \frac{1}{\Lambda-\eta} \binom{\Lambda-\eta}{\Lambda-k_\Lambda} B_{k_\Lambda-\eta} \left( \right. \\ && \left. % Term 1 {\mathfrak A}^{(\Lambda,(q-1) \wedge (\Lambda),\Lambda-1-\eta)}_{\eta_1} \cdot {\mathfrak B}^{(1)}_{p-k_\Lambda,\xi-\eta_1,\Lambda-k_\Lambda,q} 1_{q>0} + \right. \\ && \left. % Term 2 {\mathfrak A}^{(\Lambda,(q+0) \wedge (\Lambda),\Lambda-1-\eta)}_{\eta_1} \cdot \left( (q+1)^{\Lambda-k_\Lambda} - q^{\Lambda-k_\Lambda}\right) \cdot 1_{p-k_\Lambda=\xi-\eta_1=\Lambda-k_\Lambda} + \right. \\ && \left. % Term 3 {\mathfrak A}^{(\Lambda,(q+1) \wedge (\Lambda),\Lambda-1-\eta)}_{\eta_1} \cdot {\mathfrak B}^{(2)}_{p-k_\Lambda,\xi-\eta_1,\Lambda-k_\Lambda,q} \right. \\ % End && \left. \right) \tag{3} \end{eqnarray} for $q=0,\cdots, \Lambda+1$ then $p=0,\cdots,\Lambda$ and $\xi=0,\cdots,p$ and $B_\eta$ are Bernoulli numbers with the convention that $B_1 = +1/2$. Finally the quantities ${\mathfrak B}^{(1,2)}_{\cdot,\cdot,\cdot,\cdot}$ are some auxiliary coefficients which I do not write out explicitly for the sake of clarity of this presentation.


Now, the Mathematica code below evaluates the coefficients in $(3) $ for $\Lambda=2,\cdots,14$ and then, for randomly chosen $(\Lambda,n,\theta)$, verifies that the quantity in $(2)$ is equal to the definition $(1)$. Here we go:

Firstly the code that computes the coefficients:

(*Definitions*)

mBernoulliB[k_] := If[k == 1, 1/2, BernoulliB[k]];
B1[eta_, eta1_, kL_, q_] := 
  Binomial[kL, eta] (-1)^(eta + 1)
    If[eta1 != kL, 1, 1 - (-q)^kL] Binomial[eta, eta1];
B2[eta_, eta1_, kL_, q_] := 
  Binomial[kL, eta] If[eta != kL, 1, 1 - ((q + 1))^kL] If[eta == eta1,
     1, 0];

A = Table[0, {L, 1, 15}, {q, 0, L}, {p, 0, L - 1}, {xi, 0, L - 1 - p}];
A[[2, All, All, All]] = {
   {{-1, +1}, {1}},
   {{0, 2}, {0}},
   {{0, 2}, {0}}
   };
A[[3, All, All, All]] = {
   {{1, -3/2, +3/2}, {-1, +2}, {0}},
   {{-1, -3, +2}, {3/2, +2}, {-1/2}},
   {{0, 0, 4}, {0, 0}, {0}},
   {{0, 0, 4}, {0, 0}, {0}}
   };
A[[4, All, All, All]] = {
   {{-1, 2, -(5/2), 5/2}, {2/3, -3, 7/2}, {1/2, 1/2}, {-(1/6)}},
   {{2, 19/6, -4, 17/6}, {-3, -(1/2), 9/2}, {1, -1}, {0}},
   {{-1, -(11/2), -9, 7/2}, {11/6, 6, 9/2}, {-1, -(3/2)}, {1/6}},
   {{0, 0, 0, 8}, {0, 0, 0}, {0, 0}, {0}},
   {{0, 0, 0, 8}, {0, 0, 0}, {0, 0}, {0}}
   };
(*Initialization.*)
Do[
  t0 = TimeUsed[];
  Do[
   Do[
     Do[
       A[[L + 1, q + 1, 1 + (L - p), 
           1 + xi]] = (Sum[
            1/(L - eta)
              Binomial[L - eta, L - kL] mBernoulliB[
              kL - eta] (If[q > 0, 
                 A[[L, q + 0, 1 + (L - 1 - eta), 1 + eta1]], 0] B1[
                 p - kL, xi - eta1, L - kL, q] + 
               A[[L, Min[q + 1, L + 1], 1 + (L - 1 - eta), 
                  1 + eta1]] (((q + 1))^(L - kL) - (q)^(L - kL)) If[
                 p - kL == xi - eta1 == L - kL, 1, 0] + 
               A[[L, Min[q + 2, L + 1], 1 + (L - 1 - eta), 
                  1 + eta1]] B2[p - kL, xi - eta1, L - kL, q])
            , {kL, 0, Min[L - 1, p]}, {eta, 
             Max[0, xi - L + kL, xi - p], kL}, {eta1, 
             Max[0, xi - L + kL, xi - p + kL], Min[eta, xi]}] - 
           If[p >= 1 && xi <= p - 1, 
            A[[L, Min[q + 1, L + 1], 1 + (L - p), 1 + xi]], 0]);
       , {xi, 0, p}];
     , {p, 0, L}];
   , {q, 0, L + 1}];
  PrintTemporary["A[[", L, "]] computed in time = ", TimeUsed[] - t0, 
   " secs."];
  , {L, 2, Length[A] - 1}];

Now the code that computes the partial sums in $(2)$:

In[64]:= L = RandomInteger[{2, 8}]; Clear[k];
{n} = RandomInteger[{L + 1, 12}, 1];
th = RandomInteger[{1, 3}];

llI = Table[
   Sum[Product[If[k[xi] != k[xi + 1], 1, 0], {xi, 1, L}], 
    Evaluate[
     Sequence @@ 
      Table[{k[xi], Max[1, k[xi + 1] - th], 
        Min[(n + 1 - xi) th, k[xi + 1] + th]}, {xi, L, 1, -1}]]]
   , {k[L + 1], 1, (n - L) th}];
llII = Table[
   Which @@ 
    Flatten[Table[{(q) th < kL1 <= 
        If[q == L + 1, Infinity, (q + 1) th],
       Sum[
        A[[L + 1, 1 + q, 1 + L - p, 1 + xi]] kL1^(L - p) th^xi
        , {p, 0, L}, {xi, 0, p}]
       }, {q, 0, L + 1}]]
   , {kL1, 1, (n - L) th}];
llI - llII


Out[69]= {0, 0, 0, 0, 0, 0, 0, 0, 0}

Now the quantities being sought after in the main question are obtained from our partial sums by setting $\Lambda = n-1$ and then summing over $k_n=1,\cdots, \theta$. Therefore we have:

\begin{eqnarray} {\mathfrak B}^{(\theta)}_n &=& \sum\limits_{k_n=1}^\theta {\mathfrak S}^{(\theta,n)}_n(k_n) \\ %&=& \sum\limits_{p=0}^{n-1} \sum\limits_{\xi=0}^p %{\mathfrak A}^{(n,0,n-1-p)}_\xi %\frac{1}{n-p} \sum\limits_{k_n=0}^{n-1-p} %\binom{n-p}{k_n} B_{k_n} \theta^{n-p-k_n+\xi} \\ &=& \sum\limits_{\xi=1}^n \left( \sum\limits_{p=0}^{n-1} \sum\limits_{k_n=0 \vee (\xi-n+p)}^{p \wedge (\xi-1)} {\mathfrak A}^{(n,0,n-p-1)}_{k_n} \frac{1}{n-p} \binom{n-p}{\xi-k_n} B_{n-p-\xi+k_n} \right) \cdot \theta^\xi \end{eqnarray}

where in the last step we used the Faulhaber formula to sum over $k_n$ and then we collected all the terms having the same power of $\theta$ and simplified the expression.