Are Slack Variables Causing Infeasible Points in Simplex Method?

  • Context: Undergrad 
  • Thread starter Thread starter liquidFuzz
  • Start date Start date
  • Tags Tags
    Method
Click For Summary

Discussion Overview

The discussion revolves around the challenges faced when applying the simplex method to linear optimization problems, particularly regarding the selection of slack variables and starting points. Participants explore the implications of starting from infeasible points and the effects of pivoting choices on the optimization process.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant questions whether their slack variables are set up correctly, suspecting they may be causing infeasible points during iterations.
  • Another participant suggests trying a starting point that is within the feasible set, indicating that starting from an infeasible point may lead to unexpected results.
  • A participant emphasizes that starting from an infeasible point is significant, as the simplex method may not find its way into the feasible set without a proper starting point.
  • Concerns are raised about the choice of pivoting elements, with one participant sharing their tableau iterations and expressing uncertainty about how to select pivoting elements effectively.
  • Some participants discuss the nature of the simplex method, noting that it traverses the extrema of the feasible set and that starting outside this set may lead to reliance on luck for finding feasible solutions.
  • There are mentions of needing to iterate further to reach a solution, with one participant reflecting on their earlier misunderstanding of the process.
  • A suggestion is made to set slack variables to zero and solve the simultaneous equations as a potential approach to starting from a specific point.

Areas of Agreement / Disagreement

Participants express differing views on the importance of starting points and pivoting choices, indicating that multiple competing perspectives exist regarding the application of the simplex method. The discussion remains unresolved with no consensus on the best approach to take.

Contextual Notes

Participants highlight potential limitations in their understanding of the simplex method, particularly regarding the selection of pivoting elements and the implications of starting from infeasible points. There are also references to specific tableau configurations that may not be fully explored or resolved.

liquidFuzz
Messages
107
Reaction score
6
Simplex method - infeasible

I'm looking at some linear optimization problems. In one example I must be missing something, maybe someone can point it out. Here's the example:

<br /> \begin{align*}<br /> \textrm{max } f(\textbf{x}) = &amp; 2x_1 + x_2 \\<br /> \textrm{subject to} &amp; x_1 + x_2 \leq 5 \\<br /> &amp; -x_1 + x_2 \geq 1 \\<br /> &amp; \textbf{x} \geq 0 <br /> \end{align*}<br />

When I try to perform iterations of the simplex method I get funky results, not feasible stuff. I suspect that it is due to how I set up my slack variables, ##x_3## and ##x_4##. My starting point ##x=(0,0)## is not in the feasible set, but that shouldn't matter, right?

<br /> \begin{align*}<br /> \textrm{min } f(\textbf{x}) = &amp; -2x_1 - x_2 \\<br /> \textrm{subject to} &amp; x_1 + x_2 + x_3 = 5 \\<br /> &amp; x_1 - x_2 + x_4 = - 1 \\<br /> &amp; \textbf{x} \geq 0 <br /> \end{align*}<br />

Are my slack variables wrong..? Or is it something else causing me to end up in infeasible points in my iterations?
 
Physics news on Phys.org
Have you tried a starting point that is in your set? like, x1 = 1, x2 = 2?

I am not familiar with the method you're talking about, but whenever I get crazy results or errors in MATLAB from fitting, it's usually because of the starting point I've chosen.
 
liquidFuzz said:
My starting point ##x=(0,0)## is not in the feasible set, but that shouldn't matter, right?

Of course it matters - the trial solution blindly heads off down the line of steepest descent, how do you expect it is going to find its way into the feasible set?
 
MrAnchovy said:
Of course it matters - the trial solution blindly heads off down the line of steepest descent, how do you expect it is going to find its way into the feasible set?
Eh could you refresh my memory. Where do you calculate the steepest descent direction in the simplex algorithm..?
 
elegysix said:
Have you tried a starting point that is in your set? like, x1 = 1, x2 = 2?

I am not familiar with the method you're talking about, but whenever I get crazy results or errors in MATLAB from fitting, it's usually because of the starting point I've chosen.

I haven't tinkered with this in matlab. Is the optimixation tool kit good? I'll try different starting points and see what I get.
 
Maybe it's how I chose pivoting element..?

I'll post some iterations, maybe you can comment on them.

Tableau
\begin{matrix}
& x_1 & x_2 & s_1 & s_2 & f(x) & \hat{x} \\
r1 & 1 & 1 & 1 & 0 & 0 & 5 \\
r2 & 1 & -1 & 0 & 1 & 0 & -1 \\
obj & -2 & -1 & 0 & 0 & 1 & 0 \\
\end{matrix}

If I chose column ##x_1## as pivoting column the ratio test gives pivoting element ##r_1,x_1##. The updated tableau is then:
\begin{matrix}
& x_1 & x_2 & s_1 & s_2 & f(x) & \hat{x} \\
r1 & 1 & 1 & 1 & 0 & 0 & 5 \\
r2 & 0 & -2 & -1 & 1 & 0 & -6 \\
obj & 0 & 1 & 2 & 0 & 1 & 10 \\
\end{matrix}
This would imply that there are no descent direction, so no further optimization is possible. The current solution however is ##x =(5,0)## which isn't feasible.

If I instead chose starting pivoting element ##r2,x1## I end up in the point ##x=(2,3)## after a couple of iterations with ##f(2,3) = 7##. This suggests that I don't have a clue on how to chose pivoting elements. Pointers would be appreciated...
 
Sigh, I got now. I just needed to iterate until I had the solution...
 
liquidFuzz said:
Eh could you refresh my memory. Where do you calculate the steepest descent direction in the simplex algorithm..?

I could have put that better, but it would have taken more words. At each vertex (the initial vertex in particular) you have a number of choices of which variable to vary. An efficient implementation generally chooses the variable that descends most steeply (or possibly the one which achieves the greatest descent when reaching the next extremum).

This is not really relevant to the point though, which is that the simplex method works by traversing (a subset of) the extrema of the feasible set. If you start outside the feasible set you are only going to end up inside it by luck.
 
liquidFuzz said:
If I instead chose starting pivoting element ##r2,x1## I end up in the point ##x=(2,3)## after a couple of iterations with ##f(2,3) = 7##. This suggests that I don't have a clue on how to chose pivoting elements. Pointers would be appreciated...

No, it demonstrates that unless you are at an extremum the choice of reaching the solution is purely down to luck. Now you have struck lucky and found your way to x = (2,3) which is clearly an extremum, the algorithm starts to work and...

liquidFuzz said:
Sigh, I got now. I just needed to iterate until I had the solution...

Bingo!
 
  • #10
MrAnchovy said:
No, it demonstrates that unless you are at an extremum the choice of reaching the solution is purely down to luck. Now you have struck lucky and found your way to x = (2,3) which is clearly an extremum, the algorithm starts to work and...

Could you, or someone else, show me ho to start in, let's say x =(0,1)..?
 
  • #11
Set the slack variables to 0 and solve the simultaneous equations.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K