# First-Order Linear Difference Equation with Constraint

Consider the following first order linear difference equation for $y$:

$$y_{t+1} = \alpha * y_{t} + \beta * x_{t-n+1} ~~\forall t \ge n$$

For initial conditions, one could assume that $x_{i} \in \mathbb{R} ~~\forall t = 1, \ldots n$. (except that they cannot all be zero).

The other constraint is that $$y_{n} = \sum_{i=0}^{n-1} x_{n-i}$$ so that the $n$th value of $y$ in the sequence always sums to the previous $n$ values of $x_{i}$.

For example:

$y_{n} = x_{n} + x_{n-1} \ldots + x_{1}$ and process starts at time t = n because y needs to have a value for it to start.

So, for example, if $n=30$, then $y_{30}$ is the first observation for $y$ so the process starts at time t = n = 30. Note that the $x_{t}$ process starts at time $t = 1$ so we need the $x_{i} \forall i= 1,\ldots 30$ before the y process can start.

Similarly, once t is greater than or equal to n, we have

$y_{n+1} = x_{n+1} + x_{n} + \ldots x_{2}$

$y_{n+2} = x_{n+2} + x_{n+1} + \ldots x_{3}$

$\vdots$

Given the assumptions and the constraint, is there a relation between $\lambda$ and $\beta$ which meets the requirements?

I have no background in difference equations (I do have the book by Mann which talks about such a difference equation but not with that constraint) so if someone knows where an explanation for this type of thing is explained, it would be appreciated.

Essentially, once $t = n$, then, starting from there, the sum constraint needs to hold and the difference equation has to hold also. I'm pretty sure that the answer is that $\beta = -\alpha$ so that the equation reduces to

$$y_{t+1} = \alpha * (y_{t} - x_{t-n+1}) ~~\forall t \ge n$$

and then, in order to satisfy the sum constraint, $\alpha = (\frac{1}{2})^{1/n}$. But how to prove this is a different story.

• @ GCab. Is there a way to delete this question because you've made me realize that I'm not explaining it correctly. Thanks for any help with that and I apologize for wasting your time. But it wasn't totally wasted because you made me realize some things. So thank you very much. – mark leeds Jun 19 '16 at 1:38

If I understood correctly, the terms in your post can be summarized as $$\left\{ \matrix{ y_{\,t} - y_{\,t - 1} = \left( {1 - \lambda } \right)\left( {x_{\,t - 1} - y_{\,t - 1} } \right)\quad \left| {\;n \le \forall t} \right. \hfill \cr y_{\,t} = \sum\limits_{1\, \le \,k\, \le \,t} {x_{\,k} } \hfill \cr} \right.$$ Now, the starting point for $t$ is not clear. Supposing it is $0$ then: $$\left\{ \matrix{ y_{\,0} = 0 \hfill \cr y_{\,1} = x_{\,1} \hfill \cr \quad \vdots \hfill \cr y_{\,n - 1} = \sum\limits_{1\, \le \,k\, \le \,n - 1} {x_{\,k} } \hfill \cr \left\{ \matrix{ y_n - y_{\,n - 1} = \left( {1 - \lambda } \right)\left( {x_{\,n - 1} - y_{\,n - 1} } \right) \hfill \cr y_{\,n} = \sum\limits_{1\, \le \,k\, \le \,n} {x_{\,k} } \hfill \cr} \right. \hfill \cr \left\{ \matrix{ y_{\,t} - y_{\,t - 1} = \left( {1 - \lambda } \right)\left( {x_{\,t - 1} - y_{\,t - 1} } \right)\quad \hfill \cr y_{\,t} = \sum\limits_{1\, \le \,k\, \le \,t} {x_{\,k} } \hfill \cr} \right.\left| {\;n < t} \right. \hfill \cr} \right.$$ that is
$$\left\{ \matrix{ y_{\,0} = 0 \hfill \cr y_{\,1} = x_{\,1} \hfill \cr \quad \vdots \hfill \cr y_{\,n - 1} = \sum\limits_{1\, \le \,k\, \le \,n - 1} {x_{\,k} } \hfill \cr \left\{ \matrix{ y_n - y_{\,n - 1} = x_{\,n} = \left( {1 - \lambda } \right)\left( {x_{\,n - 1} - y_{\,n - 1} } \right) = - \left( {1 - \lambda } \right)\left( {\sum\limits_{1\, \le \,k\, \le \,n - 2} {x_{\,k} } } \right) \hfill \cr y_{\,n} = \sum\limits_{1\, \le \,k\, \le \,n} {x_{\,k} } \hfill \cr} \right. \hfill \cr \left\{ \matrix{ x_{\,t} = - \left( {1 - \lambda } \right)\left( {\sum\limits_{1\, \le \,k\, \le \,t - 2} {x_{\,k} } } \right) \hfill \cr y_t - y_{\,t - 1} = - \left( {1 - \lambda } \right)y_{\,t - 2} \hfill \cr} \right.\quad \left| {\;n < t} \right. \hfill \cr} \right.$$ At this point, if $n=2$, we shall put $x_{\,2} = 0,\;y_2 = y_1 = x_{\,1}$, is that compatible with your problem ? In any case for $3 \le n$ we get separated equations for $x$ and $y$, and I do not see any bound related with $\lambda$: so probably I did not catch some point about your problem.
• Hi Gab: The $y_{n}$ value is the first value and it is, by definition the sum of the first n $X_i$ values. The process starts there at time t = n. I am going to edit the question though slightly because I think I can write it in a different way that may make it clearer. Thanks for your efforts and I'm sorry for my lack of clarity. – mark leeds Jun 18 '16 at 23:22
• Unfortunately your edit made the problem even less clear to me. I mean, apart from $n$, which use is just to give an initial value to $y$, is all the problem reducing to plug the summation into the first equation ? thereby you get an equation in $x$, so ... ? – G Cab Jun 19 '16 at 0:30
• I'm sorry @G Cab for not being clear. Basically, forget about the sum constraint for a moment. Then, that is just a first order linear difference in equation for y. But, with the sum constraint, it means that the sum of every n $x_{t}$'s is equal to the value of $y_n$. So, I think the approach is to figure out what $\beta$ has to be for both the sum constraint to hold and the difference equation to hold also. – mark leeds Jun 19 '16 at 1:23