Simplex minimization problem reformation with modulus cost function

In summary: X,0). If X < 0, one feasible solution is (p,n) = (0,-X); another is (1,-X-1), etc., but the minimum is obtained at (0,-X). The same principle works with more variables, e.g., min (p + n + q), subject to p-n = X, n-q = Y, p,n,q >= 0. If X > 0, then any feasible solution with p = X has p + n + q = X + n + q ≥ X + 0 + 0 = X. If X < 0, then any feasible solution with n = -
  • #1
thomas49th
655
0

Homework Statement


If I said minimize the cost function
|a-2b| + |-3a-b|

subject to
2a + b <= 6

a,b >= 0

We can all see it's 0,0 but if I want to apply the simplex algorithm to it, how do I reformulate the problem into something I can use

Homework Equations





The Attempt at a Solution


I thought about letting y = |a-2b|and z = |-3a-b|

then isn't y = a-2b, y = -a+2b
and z = -3a-b, z = 3a+b

then saying minimize y+z subject to
2a + b <= 6
y = a-2b
y = -a+2b
z = -3a-b
z = 3a+b

Is this allowed?

Thanks
Thomas
 
Physics news on Phys.org
  • #2
thomas49th said:

Homework Statement


If I said minimize the cost function
|a-2b| + |-3a-b|

subject to
2a + b <= 6

a,b >= 0

We can all see it's 0,0 but if I want to apply the simplex algorithm to it, how do I reformulate the problem into something I can use

Homework Equations





The Attempt at a Solution


I thought about letting y = |a-2b|and z = |-3a-b|

then isn't y = a-2b, y = -a+2b
and z = -3a-b, z = 3a+b

then saying minimize y+z subject to
2a + b <= 6
y = a-2b
y = -a+2b
z = -3a-b
z = 3a+b

Is this allowed?

Thanks
Thomas

Not quite: you need inequalities y ≥ a-2b and y ≥ 2b - a, etc.

Obviously, if you impose both as equalities you must have y = a - 2b = 0. In this particular problem that would not give a wrong solution because the optimal solution is a = b = 0. However, if we changed the constraint to 2a + b >= 6, your suggestion would give a problem that might be far from optimal, or possibly even infeasible. (Actually, it would be infeasible, since it would require both 2b-a=0 and 3a + b = 0, with 2a + b >= 6 and a,b >= 0.)

Alternatively, you can write yp - yn = a - 2b, with yp, yn >= 0, and you want to minimize yp+yn. This formulation has more variables but fewer constraints. This can also be generalized to handle the problem of Maximizing the absolute values, but that problem needs additional binary variables plus some extra constraints---that is, it must be modeled as an MIP problem, rather than a pure LP: we need also that either yp = 0 or yn = 0. That happens automatically in the min problem, so can be ignored.

RGV
 
  • #3
Hi,

I'm not quite sure why you can write this

yp - yn = a - 2b

What exactly are you trying to say here and where would yp + yn come from?

Thanks
Thomas
 
  • #4
thomas49th said:
Hi,

I'm not quite sure why you can write this

yp - yn = a - 2b

What exactly are you trying to say here and where would yp + yn come from?

Thanks
Thomas

Suppose, for example, that a - 2b = 5. What do you get when you solve the problem min yp+yn, subject to yp - yn = 5, yp, yn >= 0? If, instead, you have a - 2b = -5, what do you get when you solve the problem min yp + yn, subject to yp - yn = -5, yp, yn >= 0?

RGV
 
  • #5
So basically yp - yn = 5 is a constraint
along with yp, yn >= 0.

my objective function is yp+yn

But how does a - 2b = 5 fit in here? What is the translate between y+ and y- and a and b?

Thanks
Thomas
 
  • #6
thomas49th said:
So basically yp - yn = 5 is a constraint
along with yp, yn >= 0.

my objective function is yp+yn

But how does a - 2b = 5 fit in here? What is the translate between y+ and y- and a and b?

Thanks
Thomas

Forget about a and b. Just answer my two questions: what would you get if you had (i) min yp + yn, st yp - yn = 5, yp,yn >=0; and if you had (ii) min yp + yn st yp -yn = -5, yp, yn >= 0?

RGV
 
  • #7
The minimum is 5 in the first case and 0 in the second yes?
 
  • #8
thomas49th said:
The minimum is 5 in the first case and 0 in the second yes?

No, not 0 in the second case. For yp and yn >= 0, the only way to get yp + yn = 0 would be to have yp = yn = 0, and that would not satisfy the constraint yp - yn = -5.

RGV
 
  • #9
sorry yeah equality as opposed to inequality, so it's 5 at y+ = 0, y- = 5.

So where are you trying to lead me to here?

Thanks
Thomas :P
 
  • #10
thomas49th said:
sorry yeah equality as opposed to inequality, so it's 5 at y+ = 0, y- = 5.

So where are you trying to lead me to here?

Thanks
Thomas :P

Back to the beginning: you asked how to represent an absolute value minimization objective in linear terms. That is what I have been attempting to explain to you, but leaving you to do most of the work.

RGV
 
Last edited:
  • #11
Thanks for the help,

But I'm not making the mental link

So far I know we can write |a-2b| as 2 inequalities

y ≥ a-2b and y ≥ 2b - a

But I don't see how the equation

yp - yn = a - 2b

comes about, nor why we then go onto maximise yp+yn

Thanks
Thomas
 
  • #12
thomas49th said:
Thanks for the help,

But I'm not making the mental link

So far I know we can write |a-2b| as 2 inequalities

y ≥ a-2b and y ≥ 2b - a

But I don't see how the equation

yp - yn = a - 2b

comes about, nor why we then go onto maximise yp+yn

Thanks
Thomas

Well, alright. You have already solved the problem one way, so I guess it is OK to supply the details of another way without violating the Forum rules.

The above is just the familiar splitting up of a number into positive and negative parts, then expressing the absolute value as the sum of the parts.

Look at min (p + n), subject to p-n = X, p,n >= 0. If X > 0, one feasible solution is (p,n) = (X,0); another feasible solution is (p,n) = (X+1,1), another is (p,n) = (X+2,2), ... and in general, a feasible solution is (p,n) = (X+t,t) for any t >= 0. However, among all these feasible solutions, the unique one that minimizes the sum p + n is (p,n) = (X,0). Next, suppose X < 0. One feasible solution is (p,n) = (0,-X) (noting that -X = |X| > 0); another is (p,n) = (1,-X+1), another is (p,n) = (2,-X+2), ... . Among these, the unique one that minimizes p+n is (p,n) = (0,-X) = (0,|X|), giving p+n = |X|. So, for the problem min (p+n), st p-n = X, p,n >= 0, we have
(p+n)min = |X|.

Of course, using min z, s.t. z >= X and z >= -X is another way. One way has fewer variables and more constraints, the other has more variables and fewer constraints. Each method has advantages in certain contexts.

RGV
 
Last edited:
  • #13
All good upto here

Next, suppose X < 0. One feasible solution is (p,n) = (0,-X) (noting that -X = |X| > 0); another is (p,n) = (1,-X+1), another is (p,n) = (2,-X+2), ... . Among these, the unique one that minimizes p+n is (p,n) = (0,-X) = (0,|X|), giving p+n = |X|. So, for the problem min (p+n), st p-n = X, p,n >= 0, we have

I feel like a complete incompetent.

p-n=X. So we set p = 0. n = -X. Ok the first bit makes sense but I don't understand how I can "note" -X = |X| > 0. You're saying that -X is the same as |X| (when the modulus of X is greater than 0 (aka X is not zero)).

Maybe you already did, but can you show me exactly how you obtained -X = |X| > 0 and (p,n) = (0,-X) = (0,|X|)

Many many thanks
Thomas
 
  • #14
thomas49th said:
All good upto here



I feel like a complete incompetent.

p-n=X. So we set p = 0. n = -X. Ok the first bit makes sense but I don't understand how I can "note" -X = |X| > 0. You're saying that -X is the same as |X| (when the modulus of X is greater than 0 (aka X is not zero)).

Maybe you already did, but can you show me exactly how you obtained -X = |X| > 0 and (p,n) = (0,-X) = (0,|X|)

Many many thanks
Thomas

No. When X > 0 we set p = X and n = 0. When X < 0 (that is, when X = -|X|) we set p = 0 and n = |X| = -X > 0.

OK, one very last time! Look: 5 = 5 - 0 = 6 - 1 = 7 - 2 = 8 - 3 = ... . There are lots of ways to write 5 as p-n with p,n >= 0, but the way that minimizes p+n is the first one: p = 5 and n = 0, giving p+n = 5 = |5|. Next, consider -5. We have -5 = 0 - 5 = 1 - 6 = 2 - 7 = 3 - 8 = ... . There are lots of ways to write -5 as p - n with p,n >= 0, but the one that minimizes p+n is the first one: p = 0 and n = 5. This gives p+n = 5 = |-5|.

Now I'm out of here.

RGV
 

Related to Simplex minimization problem reformation with modulus cost function

1. What is a simplex minimization problem?

A simplex minimization problem is a type of optimization problem where the goal is to find the minimum value of a linear objective function, subject to linear inequality constraints. It involves finding the optimal values of decision variables that will minimize the objective function, while satisfying all the constraints.

2. What is a modulus cost function?

A modulus cost function is a type of objective function that contains absolute value terms. It is commonly used in optimization problems to model situations where the cost or penalty is dependent on the magnitude of the decision variables, rather than just their values. The modulus function ensures that the cost remains positive, regardless of whether the decision variables are positive or negative.

3. How is a simplex minimization problem with a modulus cost function different from a standard simplex minimization problem?

Unlike a standard simplex minimization problem, where the objective function is a linear function, a simplex minimization problem with a modulus cost function has a non-linear objective function due to the presence of absolute value terms. As a result, the standard simplex algorithm cannot be directly applied to solve such problems, and a reformulation of the problem is necessary.

4. How is a simplex minimization problem with a modulus cost function reformulated?

A simplex minimization problem with a modulus cost function can be reformulated by introducing auxiliary variables to replace the absolute value terms. These auxiliary variables are then constrained to be greater than or equal to the corresponding decision variables and their negative values. This reformulated problem can then be solved using the standard simplex algorithm.

5. What are some real-world applications of simplex minimization problems with modulus cost functions?

Simplex minimization problems with modulus cost functions have many real-world applications in fields such as economics, finance, and engineering. For example, they can be used to model production planning problems, where the cost of production or inventory holding is dependent on the quantity produced or held. They can also be used in portfolio optimization to minimize risk or maximize return, where the cost or penalty is dependent on the magnitude of the investments. Additionally, they can be used in transportation planning to minimize transportation costs, where the cost is dependent on the distance travelled.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
495
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
580
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
518
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
3K
Back
Top