0
$\begingroup$

Currently I'm trying to write a practically fast LP solver for a sparse instance, which is by simplex method with LU decomposition and eta-matrix update. In the development I realized that I'm not familiar with how to choose the initial basis for simplex method, and would like some tips.

Think about a standard form of LP: maximize $cx$ s.t. $Ax \le b, x \ge 0$. In this case we can choose a obvious basis, i.e., columns of slack variables. For example, if $A = \begin{bmatrix} 1 & 2 \\ 3 & 4\end{bmatrix}$, then we extend $A$ with slack variables ($A' = \begin{bmatrix} 1 & 2 & 1 & 0\\ 3 & 4 & 0 & 1\end{bmatrix}$) and can choose the columns 3 and 4 as an initial basis. (It doesn't necessarily provide a basic feasible solution but it doesn't matter here.)

A rough version of my question is, what is the best way to choose the initial basis for equality constraints? I know a transform from an equality constraint to inequality ones at least works. For example, we can replace an equality constraint $x_1 + 2x_2 + 3x_3 = 4$ with two inequality contraints $x_1 + 2x_2 + 3x_3 \le 4, x_1 + 2x_2 + 3x_3 \ge 4$ and add two columns for slack variables. Naively thinking, however, we can directly apply simplex method against an equality form of LP (i.e. maximize $cx$ s.t. $Ax = b, x \ge 0$) without any transform, if we can choose a set of linearly independent columns of matrix $A$. Of course $A$ can be rank-deficient, but we can at least reduce the number of extended columns if we know the maximal linearly independent columns of $A$. Is this `basis' problem as hard as e.g. LP?

The reasons I'd like to avoid a transform to two constraints are:

  • It increases the size of instance,
  • and it produces yet another problem related to numerical errors. (That is, we need to choose appropriate epsilon to avoid infeasibility caused by two inequality constraints with the same bound.)

A bit detailed version of my questions are as follows:

  1. How do well-known LP solvers deal with equality constraints? Do they just replace the equality with inequality? Are my concerns above of little practical importance?
  2. (If the answer to 1 requires solving `basis' problem,) is there any practically efficient way to solve the basis problem above for a sparse instance? For a dense instance, I know e.g. Gaussian elimination works.
$\endgroup$
2
  • 1
    $\begingroup$ or.stackexchange.com $\endgroup$ Commented Apr 16, 2022 at 11:20
  • $\begingroup$ Thank you for pointing it out. I agree with that OR is more appropriate, but I leave it as it is for now because it seems I don't have a permission for moving a post. $\endgroup$ Commented Apr 28, 2022 at 22:42

1 Answer 1

0
$\begingroup$

Yes, you do not want to replace an equality with two inequalities. The concept you are looking for is called artificial variable, and searching for that phrase will show you the way.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.