How to solve a linear system of equation with floor function?

131 Views Asked by At

Say I have the linear system of equations of the form:

$\alpha x_1 + \beta x_2 = \lfloor y \rfloor$.

I want to solve for $\alpha$ and $\beta$. For instance, I have

$14 \alpha = 2$

$ 71 \alpha + 24 \beta = 33 $

$ 134 \alpha + 12 \beta = 36$

(For this problem, $\alpha = 0.2$ and $\beta = 0.8$, but $\alpha + \beta$ need not be $1$, though)

Obviously, without the floor function, this would be a trivial linear system of equations that could be solved through Gauss-Jordan elimination when transformed into a matrix.

I'm wondering if there are similar matrix manipulations to solve this "almost-linear" system of equations. And if, not any other methods that could solve a system of equations like what I have?

1

There are 1 best solutions below

0
On BEST ANSWER

I assume you mean your system to be the following:

$$ \begin{align} \left \lfloor 14\alpha \right \rfloor \;&= \; 2\\ \left \lfloor 71\alpha + 24\beta \right \rfloor \; &= \; 33 \\ \left \lfloor 134\alpha + 12\beta \right \rfloor \; &= \; 36 \\ \color{white}{text} \end{align} $$

This is the equivalent of the following system of inequalities:

$$ \begin{matrix} 2 \quad \le & 14\alpha & \lt \quad 3\\ 33 \quad \le & 71\alpha + 24\beta & \lt \quad 34 \\ 36 \quad \le & 134\alpha + 12\beta & \lt \quad 37 \\ \color{white}{text} \\ \end{matrix} $$

This will have an infinite number of solutions, though all the values will be fairly close to the solution you gave (e.g. $\,\alpha = 0.82, \beta = 0.198\,$ and $\,\alpha = 0.79, \beta = 0.204\,$ are also solutions.)

You can solve this graphically as shown below; in this case, $\,\alpha=y\,$ and $\,\beta=x.\,$ Any point in the darker shaded area would be a solution.

System of Double Inequalities