How do I maximize the objective $0 x_1 + 0 x_2 + \dots + 0 x_n$ in linear programming?

355 Views Asked by At

Given this problem for instance:

$$\begin{array}{ll} \text{maximize} & 0 x_1 + 0 x_2 + 0 x_3\\ \text{subject to} & x_1 + 3x_2 + 2x_3 = 3\\ & 2x_1 + 7x_2 + x_3 = 4\\ & 3x_1 + x_2 + 2x_3 = 5\\ & x_1, x_2, x_3 \geq 0\end{array}$$

I know how to use Simplex in general using tableau method to solve standard linear programming problems. How would I set up my initial tableau here, if my objective function is zero?

1

There are 1 best solutions below

0
On BEST ANSWER

Using CVXPY to solve the linear program:

>>> from cvxpy import *
>>> x1 = Variable()
>>> x2 = Variable()
>>> x3 = Variable()
>>> objective = Maximize(0)
>>> constraints = [  x1 + 3*x2 + 2*x3 == 3, 
                   2*x1 + 7*x2 +   x3 == 4,
                   3*x1 +   x2 + 2*x3 == 5, 
                   x1 >= 0, x2 >= 0, x3 >= 0]
>>> prob = Problem(objective, constraints)
>>> prob.solve()
-0.0
>>> prob.status
'optimal'

A feasible solution is

>>> x1.value
1.142857142857143
>>> x2.value
0.14285714285714277
>>> x3.value
0.7142857142857143

Using SymPy to perform Gaussian elimination on the augmented matrix:

>>> from sympy import *
>>> M = Matrix([[1,3,2,3],
                [2,7,1,4],
                [3,1,2,5]])
>>> M.rref()
(Matrix([
[1, 0, 0, 8/7],
[0, 1, 0, 1/7],
[0, 0, 1, 5/7]]), [0, 1, 2])

which is a nonnegative $3$-vector and, thus, admissible. Note that this solution is unique.