last day (15 days later) » 

21:33
1
A: What is the complementary slackness conditions for a primal dual pair?

Erwin KalvelagenI suspect you are talking here about $cx\le by$. Typically for feasible (but non-optimal) solutions for the primal and dual pair we have an inequality here and this becomes an equality when both are optimal.

So if two you create the dual problem and you find it's solution then the gap is zero? Or if you create the solution then the complementary slackness is equal to the difference between the two?
You have to be precise with "solution". It can mean feasible solution or optimal solution depending on the context. Optimal means gap=0.
So iff the the solution is optimal then the gap is 0? How would one go about checking if the solution is zero? (trying to get a grip on linear programming before Christmas). So any detailed explanation that works well for someone with a primarily algorithmic mind would be great as well (I tend to get a bit stuck at the mathematical notations but can understand algorithms really well).
Checking if the solution is zero? That has no meaning in this context. I think you mean checking if a solution is optimal. There must be a paragraph or even a whole chapter in your book about optimality conditions for an LP. Yes, optimality implies no gap.
Sorry I don't really have a book. But yes I do mean if the gap is zero then the solution is optimal, ok good to know but that seems like the inverse of how you would go about this as it seems like your prefer to discovered if the gap is going to be zero ahead of time. Any hints on how to do that?
21:33
I am not following you here. I can recommend Vanderbei's Linear Programming book. It has many more details than can be covered using stackexchange.
I was wondering how to see if the gap is going to be zero without actually checking if it is (like I have an answer and want to know if I can use it)
21:57
I have a copy of the book now btw
I believe gap=0 does not imply optimality. Things can be infeasible or unbounded.
Assuming feasibility of course
Ah so each time I came across z I shouldn't have been looking in the table but instead calculating slack somehow
For normal simplex method this gap concept is not important. It is more of a theoretical thing. For some interior points that work on the primal and the dual it is a measure that is really used. It has for certain implications in the economic interpretation of optimal solutions (think of sensitivity analysis).
But am I correct from reading the book that we have a slack variable equal to the distance between the chosen values and their actual values?
btw do you know any good way of checking if you have indeed correctly created the dual of a problem? Somewhat unrelated but it would be nice if there was an online tool to let me check if I was right
22:12
Chosen values and actual values are not terms I am familiar with. Slack is difference between the lhs (i.e. a'x for a given x) and the rhs (i.e. b). I.e. Ax + s = b.
ah yes that was my understanding as well.
The concept of a slack should be explained in a very early chapter.
Yes just read about that and wanted to confirm my understanding a bit before continuing (can only cover about 2 pages a minute).
But do you happen to have a tool available to see if you have correctly inverted a prime-dual pair? Or some math that can check easily?
Or maybe you could check for me to see if/ where I went wrong with my example problem
min z = x_1 +x_3
s.t. x_1 +2x_2 0 <=5
0 x_2 +2x_3 =6
x_1, x_2, x_3 >=0
max w=5y_1+6y_2
s.t. y_1 <=1
2y_1 y_2 <=0
2y_2 <=1
y1<=0,y2 free
Because if it isn't then I know why it's not making much sense what I'm doing
22:32
Sorry I don't of no tool for that. As a practitioner I am not often worried about producing a dual formulation of a model. The easiest way to check is solve both primal and dual models. The primal model gives x plus duals y. The dual model gives y + duals x.
Hmm I think it's wrong but I cannot find out where it's wrong, I followed all the steps but the solution appears unbounded?
(or at least the slack variables came out as infeasable)
Ah found what I was doing wrong, thanks you have given me a lot of understanding and a good book on linair programming :)
23:08
Very good.

last day (15 days later) »