2
$\begingroup$

Given a system of linear equations $Ax=b$, one can (in principle) write down the general solution to that system by row reducing the augmented matrix $\begin{bmatrix} A & b \end{bmatrix}$ to reduced row echelon form. This decomposes the variables into pivot variables $P$ and free variables $F$, and gives us $x_i=\sum_{j \in F} c_{ij} x_j + d_i$ for each $i \in P$. Then for each $j \in F$, $x_j$ is just an arbitrary element of the base field.

When we add in linear inequalities, we can still reduce the equations to reduced row echelon form, but it is not immediately clear what range the free variables can range over while still permitting both the equations and the inequalities to be solved. (This is assuming the inequalities involve the pivot variables; of course the situation is straightforward if they only involve the free variables.)

Is there some algorithmic way to write down the general solution of the full system? Note that the particular case I am most interested in is the case where all variables in the system are in $[0,1]$ and there are no other inequalities, so if there is a special way to handle that case then I can work with that.

A 2D example of what I mean: if I have $x+2y=1,x \geq 0,x \leq 1,y \geq 0,y \leq 1$, then I solve $x=1-2y$. To have $x \geq 0$ I must have $y \leq 1/2$. To have $x \leq 1$ I must have $y \geq 0$. So the overall region can be written as $\{ (1-2y,y) : y \in [0,1/2] \}$. What I'm not sure how to do is how to get that "$y \in [0,1/2]$" in the general situation.

My guess would be that if I have $m$ independent equations and $k$ independent inequalities in $n$ variables, then I need to take each collection of $n-m$ independent inequalities, make them equalities, and solve the resulting system for each such collection. That will give me the vertices of the polytope. I'm still not sure how to efficiently get the vertices (presumably we do not want to do Gaussian elimination ${k \choose n-m}$ times over), nor how to parametrize the polytope after I have them. The latter problem (parametrizing a convex polytope given its vertices) is more problematic for me, because my problems are small enough that brute forcing the problem of finding the vertices is not so problematic.

  • 0
    Sounds like that's just linear programming: https://en.wikipedia.org/wiki/Linear_programming2017-01-23
  • 0
    @NathanH. Not exactly, linear programming is solving an optimization problem for a linear objective function on a domain like this one. I just want to parametrize such a domain.2017-01-24

0 Answers 0