MATH170-lecture-20211109

image_2021-11-09-12-02-02

Duality #

image_2021-11-09-12-05-13

So lets find the dual of a previous problem:

image_2021-11-09-12-13-38

This is the primal problem, so lets look at the corresponding dual problem:

A dual problem is: another LP problem that is related to the primal problem with different constraints and objective function.

  • This will be a minimization problem (for a maximization primal problem)
  • Two constraints of the primal yield two decision variables fo rthe dual, say \( y_1 \) and \( y_2 \)
  • To determine the coefficients of the objective function, ie minimize \[ v= ? y_1 + ? y_2 \] . For the new constraints, lets first describe the primal problem in vector/matrix format, ie minimize \[ z = \bar{c}^T \bar{x} \] subject to \( A \bar{x} \leq \bar{b} \)

image_2021-11-09-12-28-47 image_2021-11-09-12-33-30

Another example from HW#2:

image_2021-11-09-12-39-59

Duality problems with MATLAB #

For the primal function use linprog function setup of the primal problem with the following changes:

  • use the negative transpose -A'
  • swap b and C parameters in the function
[y, u]=linprog(b, -A', C, [], [], lb, [])

image_2021-11-09-12-52-46

Another example #

image_2021-11-09-13-00-23

  • we can also switch from a primal LP minimization problem to dual LP maximization problem by reversing the steps used in the previous examples
  • then, we get the fact that “dual of the dual is the primal”

A general format to switch from a primal to a dual:

Consider a generalp LP max problem of maximizing \( z=c_1 x_1 + c_2 x_2 + \cdots + c_n x_n \) with \( n \) decision variables and \( m \) linear constraints \( C_1, C_2, \ldots, C_m \) each with a “ \( \leq \) ” format.

image_2021-11-09-13-10-07 image_2021-11-09-13-14-10