Yet another non-trivial recurrence relation to solve.

113 Views Asked by At

This question is related to a certain Markov chain with variable transition probabilities described in 1.

Let $E \in {\mathbb R}$ and $\lambda^{C} \ge 0$, $\lambda^{M} \ge 0$ and $\Lambda \ge 0$ . Define $\Delta_n$ as a shift operator, i.e. $\Delta_n f(n) := f(n) - f(n-1)$. Take $n=0,1,2,\cdots$ and consider a following recursion relation: \begin{equation} E \cdot X_E(n) = \Delta_n \left[ X_E(n+1) \left( \lambda^{M}+(n+1) \lambda^{C} \right) - \Lambda X_E(n)\right] \quad (i) \end{equation} subject to $X_E(-1) = \lambda^{M}/\Lambda X_E(0)$.

Now by taking the Z-transform of the equation above with respect to $n$, then solving the respective ordinary differential equation for the Z-transform and then inverting the Z-transform we have derived a "closed-form" expression for the sequence in question. We have: \begin{eqnarray} &&X_E(n) = X_E(0) \cdot \frac{\lambda^{M}}{\lambda^{C}} \sum\limits_{p=0}^n \binom{-\frac{E}{\lambda^{C}}}{n-p} \binom{\frac{E}{\lambda^{C}}}{p} \cdot \\ && F_{1,1}\left[ \begin{array}{r} p-n \\ 1- \frac{E}{\lambda^{C}}+p-n \end{array} ; \frac{\Lambda}{\lambda^{C}}\right] F_{1,1}\left[ \begin{array}{r} -p \\ 1+ \frac{E}{\lambda^{C}}-p \end{array} ; -\frac{\Lambda}{\lambda^{C}}\right] \cdot \frac{(-1)^n}{p+ \lambda^{M}/\lambda^{C}} \quad (ii) \end{eqnarray} In other words we have: \begin{eqnarray} \sum\limits_{n=0}^\infty X_E(n) z^n = \frac{\lambda^{M}}{\lambda^{C}} e^{ \frac{\Lambda}{\lambda^{C}} z} \cdot \left(1-z \right)^{-\frac{E}{\lambda^{C}}} z^{-\frac{\lambda^{M}}{\lambda^{C}}} \cdot \int\limits_0^z e^{-\frac{\Lambda}{\lambda^{C}} \xi} \cdot \left(1-\xi\right)^{\frac{E}{\lambda^{C}}} \cdot \xi^{\frac{\lambda^{M}}{\lambda^{C}}-1} d\xi \end{eqnarray} where the right hand side is the Z-transform of the sequence in question.

As a sanity check we take $E=0$ then we have: \begin{equation} X_0(n)= X_0(0) \cdot \frac{\Lambda^n}{\prod\limits_{i=1}^n (\lambda^{M}+i \lambda^{C})} \end{equation} as it should be ( this follows from setting to zero the argument of the shift operator in the right hand side of $(i)$ ).

Likewise we check we take $E=- i\cdot \lambda^{C}$ where $i \in {\mathbb N}$. In this case we have: \begin{eqnarray} &&X_{-i}(n) = X_{-i}(0) \cdot (-1)^n \lambda^{M} \left(\frac{\Lambda}{\lambda^{C}}\right)^n \cdot \\ &&\sum\limits_{p=0}^n \frac{(-1)^{n+p+i}}{(\lambda^{M}+\lambda^{C} p) (n-p)! p!} \cdot U[i,1+i+p,-\frac{\Lambda}{\lambda^{C}}] \cdot U[-i,1-i+n-p,\frac{\Lambda}{\lambda^{C}}] \quad (iii) \end{eqnarray} where $U[\cdot,\cdot,,\cdot]$ is the confluent hipergeometric function.

Here we only note that we have \begin{equation} \sum\limits_{n=0}^\infty X_{-i}(n) = 0 \quad (iv) \end{equation} for $i \in {\mathbb N}_+$.

In[1499]:= lC =.; L =.; EE =.; lM =.; MM = 6;
XX = lM/lC Table[
    Sum[Binomial[-(EE/lC), n - p] Binomial[EE/lC, 
        p] Hypergeometric1F1[-(n - p), 1 - EE/lC - (n - p), L/
        lC] Hypergeometric1F1[-p, 1 + EE/lC - p, -(L/lC)] 1/(
       p + lM/lC), {p, 0, n}] (-1)^n, {n, 0, MM}];
Table[-EE XX[[n + 1]] + (lC (n + 1) + lM) XX[[2 + n]] - 
   L XX[[n + 1]] - (lC (n) + lM ) XX[[n + 1]] + 
   L If[n == 0, lM/L XX[[1]], XX[[n]]], {n, 0, 
   Length[XX] - 2}] // FullSimplify

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

In[1279]:= i = RandomInteger[{0, 10}];
EE = -i lC; MM = 7;
lC = 1;
{lM, L} = RandomInteger[{1, 10}]/10;
XX = Table[0, {MM + 1}]; XX[[1]] = 1;
For[n = 0, n <= MM - 1, n++,
   XX[[2 + n]] = (EE XX[[n + 1]] + 
      L XX[[n + 1]] + (lC (n) + lM ) XX[[n + 1]] - 
      L If[n == 0, lM/L XX[[1]], XX[[n]]])/((lC (n + 1) + lM));
  XX[[n + 2]] = Expand[XX[[n + 2]]];
  ];
myDiff = (XX - 
   Table[(-1)^n lM (L/lC)^
     n Sum[((-1)^(n + p + i))  /((lM + lC p) (n - p)! p!)
        HypergeometricU[i, 1 + i + p, -(L/lC)] HypergeometricU[-i, 
        1 - i + n - p, L/lC], {p, 0, n}], {n, 0, MM}])
N[myDiff, 50]


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

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

It is interesting to plot the sequence in question. Below I took $\lambda^{M}=0.1$, $\lambda^{C}=1$, $\Lambda=5.1$ and $E = -2 + i \cdot 2/19$ for $i=0,\cdots,19$ (Violet all the way to Red respectively). We have: enter image description here

As we can see if $E=0$ then the sequence follows a uni-modal positive wave form (Red) but when $E$ becomes negative the waveform starts to develop a second mode and may take negative values.

Now my question would be the following. Can we actually derive equation $(ii)$ in a different way. Taking Z-transforms and inverting them is cumbersome and does not always work. Are there any other ways of solving recurrence relations like the one in question in $(i)$? Another question would be can we actually prove the identity $(iv)$ ?

1 "The Order Book as a Queueing System" in: F Abergel et al, Limit Order Books, Physics of Society: Econophysics and Sociophysics, Cambridge University Press 2016