2 Minor edits edited Oct 19 '17 at 8:49 Rodrigo de Azevedo 58233 silver badges1414 bronze badges Using more conventional notation, let $$x_k$$ and $$y_k$$ denote the $$k$$-th input and $$k$$-th output, respectively. $$\begin{array}{rl} y_1 &= 3 = \frac 12 x_1 + \frac 12 x_0\\ y_2 &= 4 = \frac 12 x_2 + \frac 12 x_1\\ y_3 &= 4 = \frac 12 x_3 + \frac 12 x_2\\ y_4 &= 6 = \frac 12 x_4 + \frac 12 x_3\\ y_5 &= 7 = \frac 12 x_5 + \frac 12 x_4\end{array}$$ We have an underdetermined system of $$5$$ linear equations in $$6$$ unknowns. Let $$x_0$$ be a parameter. $$\begin{bmatrix} \frac{1}{2} & 0 & 0 & 0 & 0\\ \frac{1}{2} & \frac{1}{2} & 0 & 0 & 0\\ 0 & \frac{1}{2} & \frac{1}{2} & 0 & 0\\ 0 & 0 & \frac{1}{2} & \frac{1}{2} & 0\\ 0 & 0 & 0 & \frac{1}{2} & \frac{1}{2}\end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4\\ x_5\end{bmatrix} = \begin{bmatrix} 3\\ 4\\ 4\\ 6\\ 7\end{bmatrix} - \frac 12 x_0 \begin{bmatrix} 1\\ 0\\ 0\\ 0\\ 0\end{bmatrix}$$ Using SymPy, we can solve the linear system >>> from sympy import * >>> from fractions import Fraction >>> A = Fraction(1,2) * Matrix( [[1,0,0,0,0], [1,1,0,0,0], [0,1,1,0,0], [0,0,1,1,0], [0,0,0,1,1]] ) >>> y = Matrix([3,4,4,6,7]) >>> x0 = Symbol('x0') >>> A**-1 * (y - Fraction(1,2)*x0*Matrix([1,0,0,0,0])) Matrix([ [-x0 + 6], [ x0 + 2], [-x0 + 6], [ x0 + 6], [-x0 + 8]])  Thus, the solution set is a line parametrized as follows $$\mathrm x \in \left\{ \begin{bmatrix} 6\\ 2\\ 6\\ 6\\ 8\end{bmatrix} + x_0 \begin{bmatrix} -1\\ 1\\ -1\\ 1\\ -1\end{bmatrix} : x_0 \in \mathbb R \right\}$$$$\mathrm x \in \left\{ \begin{bmatrix} 6\\ 2\\ 6\\ 6\\ 8\end{bmatrix} + x_0 \begin{bmatrix} -1\\ \,\,\,\, 1\\ -1\\ \,\,\,\, 1\\ -1\end{bmatrix} : x_0 \in \mathbb R \right\}$$ Note that if we choose $$x_0 = 1$$ then we recover the original input vector. You chose $$x_0 = 3$$ instead. Using more conventional notation, let $$x_k$$ and $$y_k$$ denote the $$k$$-th input and $$k$$-th output, respectively. $$\begin{array}{rl} y_1 &= 3 = \frac 12 x_1 + \frac 12 x_0\\ y_2 &= 4 = \frac 12 x_2 + \frac 12 x_1\\ y_3 &= 4 = \frac 12 x_3 + \frac 12 x_2\\ y_4 &= 6 = \frac 12 x_4 + \frac 12 x_3\\ y_5 &= 7 = \frac 12 x_5 + \frac 12 x_4\end{array}$$ We have an underdetermined system of $$5$$ linear equations in $$6$$ unknowns. Let $$x_0$$ be a parameter. $$\begin{bmatrix} \frac{1}{2} & 0 & 0 & 0 & 0\\ \frac{1}{2} & \frac{1}{2} & 0 & 0 & 0\\ 0 & \frac{1}{2} & \frac{1}{2} & 0 & 0\\ 0 & 0 & \frac{1}{2} & \frac{1}{2} & 0\\ 0 & 0 & 0 & \frac{1}{2} & \frac{1}{2}\end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4\\ x_5\end{bmatrix} = \begin{bmatrix} 3\\ 4\\ 4\\ 6\\ 7\end{bmatrix} - \frac 12 x_0 \begin{bmatrix} 1\\ 0\\ 0\\ 0\\ 0\end{bmatrix}$$ Using SymPy, we can solve the linear system >>> from sympy import * >>> from fractions import Fraction >>> A = Fraction(1,2) * Matrix( [[1,0,0,0,0], [1,1,0,0,0], [0,1,1,0,0], [0,0,1,1,0], [0,0,0,1,1]] ) >>> y = Matrix([3,4,4,6,7]) >>> x0 = Symbol('x0') >>> A**-1 * (y - Fraction(1,2)*x0*Matrix([1,0,0,0,0])) Matrix([ [-x0 + 6], [ x0 + 2], [-x0 + 6], [ x0 + 6], [-x0 + 8]])  Thus, the solution set is a line parametrized as follows $$\mathrm x \in \left\{ \begin{bmatrix} 6\\ 2\\ 6\\ 6\\ 8\end{bmatrix} + x_0 \begin{bmatrix} -1\\ 1\\ -1\\ 1\\ -1\end{bmatrix} : x_0 \in \mathbb R \right\}$$ Note that if we choose $$x_0 = 1$$ then we recover the original input vector. You chose $$x_0 = 3$$ instead. Using more conventional notation, let $$x_k$$ and $$y_k$$ denote the $$k$$-th input and $$k$$-th output, respectively. $$\begin{array}{rl} y_1 &= 3 = \frac 12 x_1 + \frac 12 x_0\\ y_2 &= 4 = \frac 12 x_2 + \frac 12 x_1\\ y_3 &= 4 = \frac 12 x_3 + \frac 12 x_2\\ y_4 &= 6 = \frac 12 x_4 + \frac 12 x_3\\ y_5 &= 7 = \frac 12 x_5 + \frac 12 x_4\end{array}$$ We have an underdetermined system of $$5$$ linear equations in $$6$$ unknowns. Let $$x_0$$ be a parameter. $$\begin{bmatrix} \frac{1}{2} & 0 & 0 & 0 & 0\\ \frac{1}{2} & \frac{1}{2} & 0 & 0 & 0\\ 0 & \frac{1}{2} & \frac{1}{2} & 0 & 0\\ 0 & 0 & \frac{1}{2} & \frac{1}{2} & 0\\ 0 & 0 & 0 & \frac{1}{2} & \frac{1}{2}\end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4\\ x_5\end{bmatrix} = \begin{bmatrix} 3\\ 4\\ 4\\ 6\\ 7\end{bmatrix} - \frac 12 x_0 \begin{bmatrix} 1\\ 0\\ 0\\ 0\\ 0\end{bmatrix}$$ Using SymPy, we can solve the linear system >>> from sympy import * >>> from fractions import Fraction >>> A = Fraction(1,2) * Matrix( [[1,0,0,0,0], [1,1,0,0,0], [0,1,1,0,0], [0,0,1,1,0], [0,0,0,1,1]] ) >>> y = Matrix([3,4,4,6,7]) >>> x0 = Symbol('x0') >>> A**-1 * (y - Fraction(1,2)*x0*Matrix([1,0,0,0,0])) Matrix([ [-x0 + 6], [ x0 + 2], [-x0 + 6], [ x0 + 6], [-x0 + 8]])  Thus, the solution set is a line parametrized as follows $$\mathrm x \in \left\{ \begin{bmatrix} 6\\ 2\\ 6\\ 6\\ 8\end{bmatrix} + x_0 \begin{bmatrix} -1\\ \,\,\,\, 1\\ -1\\ \,\,\,\, 1\\ -1\end{bmatrix} : x_0 \in \mathbb R \right\}$$ Note that if we choose $$x_0 = 1$$ then we recover the original input vector. You chose $$x_0 = 3$$ instead. 1 answered Oct 17 '17 at 9:58 Rodrigo de Azevedo 58233 silver badges1414 bronze badges Using more conventional notation, let $$x_k$$ and $$y_k$$ denote the $$k$$-th input and $$k$$-th output, respectively. $$\begin{array}{rl} y_1 &= 3 = \frac 12 x_1 + \frac 12 x_0\\ y_2 &= 4 = \frac 12 x_2 + \frac 12 x_1\\ y_3 &= 4 = \frac 12 x_3 + \frac 12 x_2\\ y_4 &= 6 = \frac 12 x_4 + \frac 12 x_3\\ y_5 &= 7 = \frac 12 x_5 + \frac 12 x_4\end{array}$$ We have an underdetermined system of $$5$$ linear equations in $$6$$ unknowns. Let $$x_0$$ be a parameter. $$\begin{bmatrix} \frac{1}{2} & 0 & 0 & 0 & 0\\ \frac{1}{2} & \frac{1}{2} & 0 & 0 & 0\\ 0 & \frac{1}{2} & \frac{1}{2} & 0 & 0\\ 0 & 0 & \frac{1}{2} & \frac{1}{2} & 0\\ 0 & 0 & 0 & \frac{1}{2} & \frac{1}{2}\end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4\\ x_5\end{bmatrix} = \begin{bmatrix} 3\\ 4\\ 4\\ 6\\ 7\end{bmatrix} - \frac 12 x_0 \begin{bmatrix} 1\\ 0\\ 0\\ 0\\ 0\end{bmatrix}$$ Using SymPy, we can solve the linear system >>> from sympy import * >>> from fractions import Fraction >>> A = Fraction(1,2) * Matrix( [[1,0,0,0,0], [1,1,0,0,0], [0,1,1,0,0], [0,0,1,1,0], [0,0,0,1,1]] ) >>> y = Matrix([3,4,4,6,7]) >>> x0 = Symbol('x0') >>> A**-1 * (y - Fraction(1,2)*x0*Matrix([1,0,0,0,0])) Matrix([ [-x0 + 6], [ x0 + 2], [-x0 + 6], [ x0 + 6], [-x0 + 8]])  Thus, the solution set is a line parametrized as follows $$\mathrm x \in \left\{ \begin{bmatrix} 6\\ 2\\ 6\\ 6\\ 8\end{bmatrix} + x_0 \begin{bmatrix} -1\\ 1\\ -1\\ 1\\ -1\end{bmatrix} : x_0 \in \mathbb R \right\}$$ Note that if we choose $$x_0 = 1$$ then we recover the original input vector. You chose $$x_0 = 3$$ instead.