You are on page 1of 15

Midterm Review

IEDA 3010 Tutorial 7


Chen Yang
max 𝑐 𝑇 𝑥
Standard Form s.t. 𝐴𝑥 ≤ 𝑏
x≥0
Reformulations
1. Minimize to Maximize [Objective Function]
min 𝑍 = 𝑐1 𝑥1 + 𝑐2 𝑥2 + ⋯ + 𝑐𝑛 𝑥𝑛 m𝑎𝑥 −𝑍 = −𝑐1 𝑥1 − 𝑐2 𝑥2 − ⋯ − 𝑐𝑛 𝑥𝑛
2. Larger than or equal to (≥) to Smaller than or equal to (≤) [Constraints]
𝑎𝑖1 𝑥1 + 𝑎𝑖2 𝑥2 + ⋯ + 𝑎𝑖𝑛 𝑥𝑛 ≥ 𝑏𝑖 −𝑎𝑖1 𝑥1 − 𝑎𝑖2 𝑥2 − ⋯ − 𝑎𝑖𝑛 𝑥𝑛 ≤ −𝑏𝑖
3. Equal to (=) to Smaller than or equal to (≤) [Constraints]
𝑎𝑖1 𝑥1 + 𝑎𝑖2 𝑥2 + ⋯ + 𝑎𝑖𝑛 𝑥𝑛 ≤ 𝑏𝑖
𝑎𝑖1 𝑥1 + 𝑎𝑖2 𝑥2 + ⋯ + 𝑎𝑖𝑛 𝑥𝑛 = 𝑏𝑖
−𝑎𝑖1 𝑥1 − 𝑎𝑖2 𝑥2 − ⋯ − 𝑎𝑖𝑛 𝑥𝑛 ≤ −𝑏𝑖
4. Unrestricted variable
𝑥𝑗 unrestricted
𝑥𝑗 = 𝑥𝑗+ − 𝑥𝑗− Replace 𝑥𝑗 with 𝑥𝑗+ − 𝑥𝑗−
in sign for some
𝑥𝑗+ , 𝑥𝑗− ≥ 0 everywhere
values of j
Geometry of LP Review
• Constraints
▪ Example: inequality constraint
x1 + 2x2 ≤ 3 define a half space

• Feasible Region
▪ Intersection of all constraints

• Extreme Points
▪ Corner points inside the feasible region
Geometry of LP Review
• Objective function
▪ Isoquant

• Optimal solution
▪ Best feasible solution
▪ Unique, not unique, not finite optimal solution

• Binding and non-binding constraints: equal or inequal

• Theorem: For any feasible LP with a finite number of optimal solution, there exists
an optimal solution that is an extreme point.
▪ From infinite number of feasible solution to finite number of extreme points
Geometry of Simplex Method
• Adjacent Corner-Point Feasible (CPF) Solution
▪ Corner-point feasible solutions (Extreme points)
▪ Corner-point infeasible solutions

▪ Adjacent CPF solutions (“neighbors”)


▪ Optimality test: If a CPF has no better
“neighbors”, it is an optimal solution.
Simplex Method
• Terms in Simplex Method
▪ Slack variables:
e.g. 𝑥1 ≤ 4 -> 𝑥1 + 𝑥3 = 4 , where 𝑥3 is the slack variable

▪ Augmented form
▪ Augmented solution
▪ Basic solution:
augmented corner-point solution
▪ Basic feasible (BF) solution:
augmented CPF solution

▪ Non-basic variable and Basic variable


Sensitivity Analysis
• Changes in Objective Function Coefficient (𝑐𝑗 )
▪ Sensitive range of 𝑐𝑗 is the range of values over which the current optimal solution will
remain optimal. Objective value always changes.

• Changes in 𝑏𝑖
▪ The sensitive range of 𝑏𝑖 is the range of values over which the binding constraints will
remain so. Optimal solution and objective value always changes.
▪ Shadow price: marginal change of objective value with an extra unit of resource or
requirement. (valid only in sensitivity range)

• Changes in 𝑎𝑖𝑗
▪ Similar to the effect of changing 𝑐𝑗 , the constraint will rotate when 𝑎𝑖𝑗 changes.

• Graphical analysis
Duality
• Weak duality:
If x is a feasible solution in the primal problem; y is𝑛a feasible𝑚solution in the dual problem, then
𝑐𝑇𝑥 ≤ 𝑦𝑇𝑏 , 𝑖. 𝑒. ෍ 𝑐𝑗 𝑥𝑗 ≤ ෍ 𝑏𝑖 𝑦𝑖
𝑗=1 𝑖=1

• Strong duality:
If x* is an optimal solution in the primal problem; y* 𝑛is an optimal
𝑚
solution in the dual problem, then
𝑐 𝑇 𝑥 ∗ = 𝑦 ∗𝑇 𝑏 , 𝑖. 𝑒. ෍ 𝑐𝑗 𝑥𝑗∗ = ෍ 𝑏𝑖 𝑦𝑖∗
𝑗=1 𝑖=1

• Primal dual relation:


Relations of sign of primal and dual
Write the Dual
Write dual from primal
• Represent the dual variables
• Exchange 𝑏 and 𝑐
• Determine the sign
• Transpose 𝑎
Discrete Variable
• Common usage of binary variable
▪ At most one event can occur → sum of variables less than or equal to 1
𝑥1 + 𝑥2 + 𝑥3 ≤ 1

▪ All or nothing (All variables are 0 or 1 simultaneously)


𝑥𝑖 = 𝑥𝑗 , 𝑖 ≠ 𝑗
▪ Conditional: Event 1 must occur if Event 2 occurs
𝑥1 ≥ 𝑥2

▪ Conditional Range: If Event 𝑥 does not occur, then 𝑦 = 0. If Event 𝑥 occurs,


then 0 ≤ 𝑦 ≤ 𝑌.
0 ≤ 𝑦 ≤ 𝑌𝑥, 𝑥 ∈ {0,1}
If 𝑥 = 0, 0 ≤ 𝑦 ≤ 0 ⇒ 𝑦 = 0; if 𝑥 = 1, 0 ≤ 𝑦 ≤ 𝑌.
Discrete Variable
• Innovative uses of binary variable
▪ Either-or constraint: either cons1 or cons2 should hold (At least one holds).
𝑙ℎ𝑠1 ≤ 𝑟ℎ𝑠1 + 𝑀𝑦
𝑙ℎ𝑠2 ≤ 𝑟ℎ𝑠2 + 𝑀 1 − 𝑦
If 𝑦 = 0, cons2 is trivial, while if 𝑦 = 1, cons1 is trivial.

▪ K out of N Constraints Must Hold (At least K holds)


𝑙ℎ𝑠𝑖 ≤ 𝑟ℎ𝑠𝑖 + 𝑀 𝑦𝑖 , 𝑖 = 1, … , 𝑁
𝑁

෍ 𝑦𝑖 = 𝑁 − 𝐾
𝑖=1

Equivalent at least K constraints hold: σ𝑁


𝑖=1 𝑦𝑖 ≤ 𝑁 − 𝐾
Usage of Binary Variable
• Innovative uses of binary variable
▪ Functions with 𝑁 possible values
Suppose 𝑏 can be 𝑏1 , 𝑏2 , 𝑏3 . Then
𝒂𝑻 𝒙 ≥ 𝑏1 𝑦1 + 𝑏2 𝑦2 + 𝑏3 𝑦3
𝒂𝑻 𝒙 ≥ 𝑏 ⟺ ൞ 𝑦1 + 𝑦2 + 𝑦3 = 1
𝑦1 , 𝑦2 , 𝑦3 ∈ {0, 1}

▪ Fixed charge

𝑓 𝑥 = 𝑐𝑥 + 𝑑𝑦
0, if 𝑥 = 0
𝑓 𝑥 = ቊ ⇔ ൞ 0 ≤ 𝑥 ≤ 𝑀𝑦
𝑐𝑥 + 𝑑, if 𝑥 > 0
𝑦 ∈ {0,1}
LP Relaxation
LP relaxation: simply replace the integer variables by continuous
variables

max 𝑍 = 𝑥1 + 5𝑥2
𝑠. 𝑡. 𝑥1 + 10𝑥2 ≤ 20,
0 ≤ 𝑥1 ≤ 2,
𝑥2 ≥ 0,
𝑥1 , 𝑥2 are integers
Branch and Bound
Divide and conquer
• Branch
▪ Assign two ranges to the branching
variable and partition the feasible region.
• Bound
▪ Solve the LP relaxation as a bound.
• Fathom
▪ Infeasible.
▪ Worse objective than the current best one.
▪ Find a better integer solution. Update the
current best solution. (Incumbent)

You might also like