4

I am new to Optimization so I think the following question may be very easy, but I'm not sure how to solve it.

The dual of an LP is an LP. If we solve the dual LP, we can get the optimal value for the primal problem. But:

  1. How do we get the optimal decision variables for the primal?

  2. Does it make a difference if we only relax some of the constraints?

My Work for Finding Dual of LP

\begin{align*} &\text{min } &c^Tx \\ &\text{s.t. } &Ax = b \\ &&Bx \le d \\ \end{align*}

We form the Lagrangian ($\mu \ge 0$): \begin{align*} L(x, \lambda, \mu) &= c^Tx + \lambda^T (Ax - b) + \mu^T (Bx - d) \\ &= (c + A^T \lambda + B^T \mu)^Tx - \lambda^Tb - \mu^Td \end{align*}

Thus we see that the dual function is $$d(\lambda, \mu) = \inf_x L(x, \lambda, \mu) = \begin{cases} - \lambda^Tb - \mu^Td \ \ \ &\text{if } \ \ \ c + A^T \lambda + B^T \mu = 0 \\ - \infty & \text{otherwise} \end{cases}$$ and therefore the dual problem is \begin{align*} &\text{max } &-\lambda^Tb - \mu^Td \\ &\text{s.t. } &c + A^T \lambda + B^T \mu = 0\\ \end{align*}

Helix
  • 141
  • 4
  • @Rob Thanks for the suggestion. Your link answers the question of how to find the dual; but I know how to do this, as I demonstrated in the OP. My question is about how to deduce the primal solution from the dual solution. – Helix Aug 23 '22 at 15:28
  • Please note that there are some answers here: https://stackexchange.com/search?q=+primal+solution+of+an+LP+from+the+dual+solution - and you are allowed to answer your own question. – Rob Aug 23 '22 at 17:09
  • Cross-posted: https://math.stackexchange.com/questions/4517235/how-to-get-primal-solution-of-an-lp-from-dual-solution – RobPratt Aug 24 '22 at 03:15
  • @Helix Please, consider that the dual problem actually is \begin{align} &\text{max } &\lambda^Tb - \mu^Td \ &\text{s.t. } & A^T \lambda + B^T \mu - c \le 0\ \end{align} – marco tognoli Jan 03 '24 at 11:33

3 Answers3

6

The duals or shadow prices of the dual model give you a primal solution. See http://yetanothermathprogrammingconsultant.blogspot.com/2022/08/primal-dual-and-equilibrium-format-of.html for a simple example.

Erwin Kalvelagen
  • 2,676
  • 1
  • 6
  • 11
2

an intuitive transformation

I'm also interested in this problem. I think the transformation between the dual solution and the primal solution must be related to KKT conditions, so I give my intuitive solution.

0

If in primal problem the variable $\mathbf x$ was a vector of dimension $n$ and constraints were made of $m+p$ equations, in dual problem we should have $n$ equations in $m+p$ variables. It is common practice to solve the dual problem especially when its resolution is easier and quicker than the primary problem: it is the case when $ m+p > n $ and Rocuhe-Capelli theorem holds so that there are more than one single solution.

At the optimum, the equality of the values of the objective functions in primal and dual problems holds, so that it is possible to evaluate the quality of an admissible point in the primal problem without having to solve the last one exactly.

In order to assess the goodness of an admissible point under examination $\mathbf x'$ we can simply compare the value $f(\mathbf x')=\sum_{i=1}^n c_i x'_i $ with $f(\mathbf x^*)$, where $f(\mathbf x^*)$ is equal to the optimal value of the objective function of the dual: $f(\mathbf x^*)=h(\mathbf y^*)$.

In a minimum cost problem if it turns out that $ 0 < f(\mathbf x') - f(\mathbf x^*) \leq \varepsilon $, then we could be content with approximating $\mathbf x^*$ with $\mathbf x'$ confident in the fact that the additional cost to be incurred for choosing a sub-optimal solution $\mathbf x'$ is certainly not greater than $\varepsilon$

marco tognoli
  • 413
  • 2
  • 7