csc373 week 7: linear programming
TRANSCRIPT
CSC373
Week 7: Linear Programming
373F21 - Nisarg Shah 1
Illustration Courtesy: Kevin Wayne & Denis Pankratov
Recap
373F21 - Nisarg Shah 2
โข Network flow
โข Ford-Fulkerson algorithm
o Ways to make the running time polynomial
โข Correctness using max-flow, min-cut
โข Applications:
o Edge-disjoint paths
o Multiple sources/sinks
o Circulation
o Circulation with lower bounds
o Survey design
o Image segmentation
o Profit maximization
Brewery Example
373F21 - Nisarg Shah 3
โข A brewery can invest its inventory of corn, hops and malt into producing some amount of ale and some amount of beerโข Per unit resource requirement and profit of the two items are as
given below
Example Courtesy: Kevin Wayne
Brewery Example
373F21 - Nisarg Shah 4
โข Suppose it produces ๐ดunits of ale and ๐ต units of beer
โข Then we want to solve this program:
Linear Function
373F21 - Nisarg Shah 5
โข ๐:โ๐ โ โ is a linear function if ๐ ๐ฅ = ๐๐๐ฅ for some ๐ โ โ๐
โข Example: ๐ ๐ฅ1, ๐ฅ2 = 3๐ฅ1 โ 5๐ฅ2 =3โ5
๐ ๐ฅ1๐ฅ2
โข Linear objective: ๐
โข Linear constraints:โข ๐ ๐ฅ = ๐, where ๐:โ๐ โ โ is a linear function and ๐ โ โ
โข Line in the plane (or a hyperplane in โ๐)
โข Example: 5๐ฅ1 + 7๐ฅ2 = 10
Linear Function
373F21 - Nisarg Shah 6
โข Geometrically, ๐ is the normal vector of the line(or hyperplane) represented by ๐๐๐ฅ = ๐
Linear Programming
373F21 - Nisarg Shah 8
โข Maximize/minimize a linear function subject to linear equality/inequality constraints
โข Claim: Regardless of the objective function, there must be a vertex that is an optimal solution
Optimal Solution At A Vertex
373F21 - Nisarg Shah 12
Convexity
373F21 - Nisarg Shah 13
โข Convex set: ๐ is convex if ๐ฅ, ๐ฆ โ ๐, ๐ โ [0,1] โ ๐๐ฅ + 1 โ ๐ ๐ฆ โ ๐
โข Vertex: A point which cannot be written as a strict convex combination of any two points in the set
โข Observation: Feasible region of an LP is a convex set
Optimal Solution At A Vertex
373F21 - Nisarg Shah 14
โข Intuitive proof of the claim:โข Start at some point ๐ฅ in the feasible region
โข If ๐ฅ is not a vertex:
o Find a direction ๐ such that points within a positive distance of ๐ from ๐ฅ in both ๐ and โ๐ directions are within the feasible region
o Objective must not decrease in at least one of the two directions
o Follow that direction until you reach a new point ๐ฅ for which at least one more constraint is โtightโ
โข Repeat until we are at a vertex
LP, Standard Formulation
373F21 - Nisarg Shah 15
โข Input: ๐, ๐1, ๐2, โฆ , ๐๐ โ โ๐, ๐ โ โ๐
โข There are ๐ variables and ๐ constraints
โข Goal:
LP, Standard Matrix Form
373F21 - Nisarg Shah 16
โข Input: ๐, ๐1, ๐2, โฆ , ๐๐ โ โ๐, ๐ โ โ๐
โข There are ๐ variables and ๐ constraints
โข Goal:
Convert to Standard Form
373F21 - Nisarg Shah 17
โข What if the LP is not in standard form?
โข Constraints that use โฅo ๐๐๐ฅ โฅ ๐ โ โ๐๐๐ฅ โค โ๐
โข Constraints that use equality
o ๐๐๐ฅ = ๐ โ ๐๐๐ฅ โค ๐, ๐๐๐ฅ โฅ ๐
โข Objective function is a minimization
o Minimize ๐๐๐ฅ โ Maximize โ๐๐๐ฅ
โข Variable is unconstrained
o ๐ฅ with no constraint โ Replace ๐ฅ by two variables ๐ฅโฒand ๐ฅโฒโฒ, replace every occurrence of ๐ฅ with ๐ฅโฒ โ ๐ฅโฒโฒ, and add constraints ๐ฅโฒ โฅ 0, ๐ฅโฒโฒ โฅ 0
Optimal Solution
373F21 - Nisarg Shah 19
โข Does an LP always have an optimal solution?
โข No! The LP can โfailโ for two reasons:
1. It is infeasible, i.e., ๐ฅ ๐ด๐ฅ โค ๐} = โ o E.g., the set of constraints is ๐ฅ1 โค 1,โ๐ฅ1โค โ2
2. It is unbounded, i.e., the objective function can be made arbitrarily large (for maximization) or small (for minimization)o E.g., โmaximize ๐ฅ1 subject to ๐ฅ1 โฅ 0โ
โข But if the LP has an optimal solution, we know that there must be a vertex which is optimal
Simplex Algorithm
373F21 - Nisarg Shah 20
โข Simple algorithm, easy to specify geometrically
โข Worst-case running time is exponential
โข Excellent performance in practice
Algorithmic Implementation
373F21 - Nisarg Shah 22
Start at a vertex of feasible
polytope
Move to a neighbor vertex
with better objective value
Terminate, declare the current
solution and value as optimal
Is there a neighbor vertex
with better objective value?
How Do We Implement This?
373F21 - Nisarg Shah 23
โข Weโll work with the slack form of LPโข Convenient for implementing simplex operations
โข We want to maximize ๐ง in the slack form, but for now, forget about the maximization objective
Simplex: Step 1
373F21 - Nisarg Shah 26
โข Start at a feasible vertexโข How do we find a feasible vertex?
โข For now, assume ๐ โฅ 0 (that is, each ๐๐ โฅ 0)o In this case, ๐ฅ = 0 is a feasible vertex.
o In the slack form, this means setting the nonbasic variables to 0
โข Weโll later see what to do in the general case
Simple: Step 2
373F21 - Nisarg Shah 27
โข What next? Letโs look at an example
โข To increase the value of ๐ง:โข Find a nonbasic variable with a positive coefficient
o This is called an entering variable
โข See how much you can increase its value without violating any constraints
Simple: Step 2
373F21 - Nisarg Shah 28
This is because the current values of ๐ฅ2 and ๐ฅ3 are 0,
and we need ๐ฅ4, ๐ฅ5, ๐ฅ6 โฅ 0
Simple: Step 2
373F21 - Nisarg Shah 29
Tightest obstacle
โข Solve the tightest obstacle for the nonbasic variable
๐ฅ1 = 9 โ๐ฅ24โ๐ฅ32โ๐ฅ64
o Substitute the entering variable (called pivot) in other equations
o Now ๐ฅ1 becomes basic and ๐ฅ6 becomes non-basic
o ๐ฅ6 is called the leaving variable
Simplex: Step 2
373F21 - Nisarg Shah 30
โข After one iteration of this step:โข The basic feasible solution (i.e., substituting 0 for all nonbasic
variables) improves from ๐ง = 0 to ๐ง = 27
โข Repeat!
Simplex: Step 2
373F21 - Nisarg Shah 33
โข There is no entering variable (nonbasic variable with positive coefficient) โข What now? Nothing! We are done. โข Take the basic feasible solution (๐ฅ3 = ๐ฅ5 = ๐ฅ6 = 0).โข Gives the optimal value ๐ง = 28โข In the optimal solution, ๐ฅ1 = 8, ๐ฅ2 = 4, ๐ฅ3 = 0
Simplex Overview
373F21 - Nisarg Shah 34
Start at a vertex of feasible
polytope
Move to a neighbor vertex
with better objective value
Terminate, declare the current
solution and value as optimal
Is there a neighbor vertex
with better objective value?
Simplex Overview
373F21 - Nisarg Shah 35
Assuming ๐ โฅ0, start with a basic feasible
solution
Move to a neighbor vertex
with better objective value
Terminate, declare the current
solution and value as optimal
Is there a neighbor vertex
with better objective value?
Simplex Overview
373F21 - Nisarg Shah 36
Assuming ๐ โฅ0, start with a basic feasible
solution
Move to a neighbor vertex
with better objective value
Terminate, declare the current
solution and value as optimal
Is there an entering variable
with positive coefficient?
Simplex Overview
373F21 - Nisarg Shah 37
Assuming ๐ โฅ0, start with a basic feasible
solution
Pivot on a leaving variable
Terminate, declare the current
solution and value as optimal
Is there an entering variable
with positive coefficient?
Simplex Overview
373F21 - Nisarg Shah 38
Assuming ๐ โฅ0, start with a basic feasible
solution
Pivot on a leaving variable
Terminate, declare optimal value
Is there an entering variable
with positive coefficient?
Some Outstanding Issues
373F21 - Nisarg Shah 39
โข What if the entering variable has no upper bound?โข If it doesnโt appear in any constraints, or only appears in constraints
where it can go to โ
โข Then ๐ง can also go to โ, so declare that LP is unbounded
โข What if pivoting doesnโt change the constant in ๐ง?โข Known as degeneracy, and can lead to infinite loops
โข Can be prevented by โperturbingโ ๐ by a small random amount in each coordinate
โข Or by carefully breaking ties among entering and leaving variables, e.g., by smallest index (known as Blandโs rule)
Some Outstanding Issues
373F21 - Nisarg Shah 40
โข We assumed ๐ โฅ 0, and then started with the vertex ๐ฅ = 0
โข What if this assumption does not hold?
๐ฟ๐1
Max ๐๐๐ฅ
s.t. ๐1๐๐ฅ โค ๐1
๐2๐๐ฅ โค ๐2
โฎ
๐๐๐ ๐ฅ โค ๐๐
๐ฅ โฅ 0
๐ฟ๐2
Max ๐๐๐ฅ
s.t. ๐1๐๐ฅ + ๐ 1 = ๐1
๐2๐๐ฅ + ๐ 2 = ๐2
โฎ
๐๐๐ ๐ฅ + ๐ ๐ = ๐๐
๐ฅ, ๐ โฅ 0
๐ฟ๐3
Max ๐๐๐ฅ
s.t. ๐1๐๐ฅ + ๐ 1 = ๐1
โ๐2๐๐ฅ โ ๐ 2 = โ๐2
โฎ
โ๐๐๐ ๐ฅ โ ๐ ๐ = โ๐๐
๐ฅ, ๐ โฅ 0
Multiply every constraint with negative ๐๐ by โ 1 so RHS is now positive
Some Outstanding Issues
373F21 - Nisarg Shah 41
โข We assumed ๐ โฅ 0, and then started with the vertex ๐ฅ = 0
โข What if this assumption does not hold?
๐ฟ๐3
Max ๐๐๐ฅ
s.t. ๐1๐๐ฅ + ๐ 1 = ๐1
โ๐2๐๐ฅ โ ๐ 2 = โ๐2
โฎ
โ๐๐๐ ๐ฅ โ ๐ ๐ = โ๐๐
๐ฅ, ๐ โฅ 0 Remember: RHS is now positive
๐ฟ๐4
Min ฯ๐ ๐ง๐
s.t. ๐1๐๐ฅ + ๐ 1 + ๐ง1 = ๐1
โ๐2๐๐ฅ โ ๐ 2 + ๐ง2 = โ๐2
โฎ
โ๐๐๐ ๐ฅ โ ๐ ๐ + ๐ง๐ = โ๐๐
๐ฅ, ๐ , ๐ง โฅ 0
Remember: we only want to find a basic feasible solution to ๐ฟ๐1
Some Outstanding Issues
373F21 - Nisarg Shah 42
โข We assumed ๐ โฅ 0, and then started with the vertex ๐ฅ = 0
โข What if this assumption does not hold?
Remember: the RHS is now positive
๐ฟ๐4
Min ฯ๐ ๐ง๐
s.t. ๐1๐๐ฅ + ๐ 1 + ๐ง1 = ๐1
โ๐2๐๐ฅ โ ๐ 2 + ๐ง2 = โ๐2
โฎ
โ๐๐๐ ๐ฅ โ ๐ ๐ + ๐ง๐ = โ๐๐
๐ฅ, ๐ , ๐ง โฅ 0
What now?โข Solve ๐ฟ๐4 using simplex with
the initial basic solution being ๐ฅ = ๐ = 0, ๐ง = ๐
โข If its optimum value is 0, extract a basic feasible solution ๐ฅโ from it, use it to solve ๐ฟ๐1 using simplex
โข If optimum value for ๐ฟ๐4 is greater than 0, then ๐ฟ๐1 is infeasible
Some Outstanding Issues
373F21 - Nisarg Shah 43
โข Curious about pseudocode? Proof of correctness? Running time analysis?
โข See textbook for details, but this is NOT in syllabus!
Running Time
373F21 - Nisarg Shah 44
โข Notesโข #vertices of a polytope can be exponential in the #constraints
o There are examples where simplex takes exponential time if you choose your pivots arbitrarily
o No pivot rule known which guarantees polynomial running time
โข Other algorithms known which run in polynomial time
o Ellipsoid method, interior point method, โฆ
o Ellipsoid uses ๐(๐๐3๐ฟ) arithmetic operations
โข ๐ฟ = length of input in binary
o But no known strongly polynomial time algorithm
โข Number of arithmetic operations = poly(m,n)
โข We know how to avoid dependence on length(b), but not for length(A)
Certificate of Optimality
373F21 - Nisarg Shah 45
โข Suppose you design a state-of-the-art LP solver that can solve very large problem instances
โข You want to convince someone that you have this new technology without showing them the codeโข Idea: They can give you very large LPs and you can quickly return the
optimal solutions
โข Question: But how would they know that your solutions are optimal, if they donโt have the technology to solve those LPs?
Certificate of Optimality
373F21 - Nisarg Shah 46
โข Suppose I tell you that ๐ฅ1, ๐ฅ2 = (100,300) is optimal with objective value 1900
โข How can you check this?โข Note: Can easily substitute (๐ฅ1, ๐ฅ2), and verify that it is feasible, and
its objective value is indeed 1900
Certificate of Optimality
373F21 - Nisarg Shah 47
โข Any solution that satisfies these inequalities also satisfies their positive combinationsโข E.g. 2*first_constraint + 5*second_constraint + 3*third_constraint
โข Try to take combinations which give you ๐ฅ1 + 6๐ฅ2 on LHS
โข Claim: ๐ฅ1, ๐ฅ2 = (100,300) is optimal with objective value 1900
Certificate of Optimality
373F21 - Nisarg Shah 48
โข first_constraint + 6*second_constraintโข ๐ฅ1 + 6๐ฅ2 โค 200 + 6 โ 300 = 2000
โข This shows that no feasible solution can beat 2000
โข Claim: ๐ฅ1, ๐ฅ2 = (100,300) is optimal with objective value 1900
Certificate of Optimality
373F21 - Nisarg Shah 49
โข 5*second_constraint + third_constraintโข 5๐ฅ2 + ๐ฅ1 + ๐ฅ2 โค 5 โ 300 + 400 = 1900
โข This shows that no feasible solution can beat 1900
o No need to proceed further
o We already know one solution that achieves 1900, so it must be optimal!
โข Claim: ๐ฅ1, ๐ฅ2 = (100,300) is optimal with objective value 1900
Is There a General Algorithm?
373F21 - Nisarg Shah 50
โข Introduce variables ๐ฆ1, ๐ฆ2, ๐ฆ3 by which we will be multiplying the three constraintsโข Note: These need not be integers. They can be reals.
โข After multiplying and adding constraints, we get:๐ฆ1 + ๐ฆ3 ๐ฅ1 + ๐ฆ2 + ๐ฆ3 ๐ฅ2 โค 200๐ฆ1 + 300๐ฆ2 + 400๐ฆ3
Is There a General Algorithm?
373F21 - Nisarg Shah 51
โข We have: ๐ฆ1 + ๐ฆ3 ๐ฅ1 + ๐ฆ2 + ๐ฆ3 ๐ฅ2 โค 200๐ฆ1 + 300๐ฆ2 + 400๐ฆ3
โข What do we want?
o ๐ฆ1, ๐ฆ2, ๐ฆ3 โฅ 0 because otherwise direction of inequality flips
o LHS to look like objective ๐ฅ1 + 6๐ฅ2โข In fact, it is sufficient for LHS to be an upper bound on objective
โข So, we want ๐ฆ1 + ๐ฆ3 โฅ 1 and ๐ฆ2 + ๐ฆ3 โฅ 6
Is There a General Algorithm?
373F21 - Nisarg Shah 52
โข We have: ๐ฆ1 + ๐ฆ3 ๐ฅ1 + ๐ฆ2 + ๐ฆ3 ๐ฅ2 โค 200๐ฆ1 + 300๐ฆ2 + 400๐ฆ3
โข What do we want?
o ๐ฆ1, ๐ฆ2, ๐ฆ3 โฅ 0
o ๐ฆ1 + ๐ฆ3 โฅ 1, ๐ฆ2 + ๐ฆ3 โฅ 6
o Subject to these, we want to minimize the upper bound 200๐ฆ1 +300๐ฆ2 + 400๐ฆ3
Is There a General Algorithm?
373F21 - Nisarg Shah 53
โข We have: ๐ฆ1 + ๐ฆ3 ๐ฅ1 + ๐ฆ2 + ๐ฆ3 ๐ฅ2 โค 200๐ฆ1 + 300๐ฆ2 + 400๐ฆ3
โข What do we want?
o This is just another LP!
o Called the dual
o Original LP is called the primal
Is There a General Algorithm?
373F21 - Nisarg Shah 54
โข The problem of verifying optimality is another LPo For any ๐ฆ1, ๐ฆ2, ๐ฆ3 that you can find, the objective value of the
dual is an upper bound on the objective value of the primal
o If you found a specific ๐ฆ1, ๐ฆ2, ๐ฆ3 for which this dual objective becomes equal to the primal objective for the (๐ฅ1, ๐ฅ2) given to you, then you would know that the given ๐ฅ1, ๐ฅ2 is optimal for primal (and your (๐ฆ1, ๐ฆ2, ๐ฆ3) is optimal for dual)
Is There a General Algorithm?
373F21 - Nisarg Shah 55
โข The problem of verifying optimality is another LPo Issue 1: Butโฆbutโฆif I canโt solve large LPs, how will I solve the dual
to verify if optimality of (๐ฅ1, ๐ฅ2) given to me?
โข You donโt. Ask the other party to give you both (๐ฅ1, ๐ฅ2) and the corresponding ๐ฆ1, ๐ฆ2, ๐ฆ3 for proof of optimality
o Issue 2: What if there are no (๐ฆ1, ๐ฆ2, ๐ฆ3) for which dual objective matches primal objective under optimal solution (๐ฅ1, ๐ฅ2)?
โข As we will see, this canโt happen!
Is There a General Algorithm?
373F21 - Nisarg Shah 56
Primal LP Dual LP
โข General version, in our standard form for LPs
Is There a General Algorithm?
373F21 - Nisarg Shah 57
Primal LP Dual LP
o ๐๐๐ฅ for any feasible ๐ฅ โค ๐ฆ๐๐ for any feasible ๐ฆ
o maxprimal feasible ๐ฅ
๐๐๐ฅ โค mindual feasible ๐ฆ
๐ฆ๐๐
o If there is (๐ฅโ, ๐ฆโ) with ๐๐๐ฅโ = ๐ฆโ ๐๐, then both must be optimal
o In fact, for optimal ๐ฅโ, ๐ฆโ , we claim that this must happen!
โข Does this remind you of something? Max-flow, min-cutโฆ
Weak Duality
373F21 - Nisarg Shah 58
โข From here on, assume primal LP is feasible and bounded
โข Weak duality theorem:โข For any primal feasible ๐ฅ and dual feasible ๐ฆ, ๐๐๐ฅ โค ๐ฆ๐๐
โข Proof:๐๐๐ฅ โค ๐ฆ๐๐ด ๐ฅ = ๐ฆ๐ ๐ด๐ฅ โค ๐ฆ๐๐
Primal LP Dual LP
Strong Duality
373F21 - Nisarg Shah 59
โข Strong duality theorem:โข For any primal optimal ๐ฅโ and dual optimal ๐ฆโ, ๐๐๐ฅโ = ๐ฆโ ๐๐
Primal LP Dual LP
Strong Duality Proof
373F21 - Nisarg Shah 60
โข Farkasโ lemma (one of many, many versions):โข Exactly one of the following holds:
1) There exists ๐ฅ such that ๐ด๐ฅ โค ๐
2) There exists ๐ฆ such that ๐ฆ๐๐ด = 0, ๐ฆ โฅ 0, ๐ฆ๐๐ < 0
โข Geometric intuition:โข Define image of ๐ด = set of all possible values of ๐ด๐ฅ
โข It is known that this is a โlinear subspaceโ (e.g., a line in a plane, a line or plane in 3D, etc)
This slide is not in the scope of the course
Strong Duality Proof
373F21 - Nisarg Shah 61
โข Farkasโ lemma: Exactly one of the following holds:1) There exists ๐ฅ such that ๐ด๐ฅ โค ๐
2) There exists ๐ฆ such that ๐ฆ๐๐ด = 0, ๐ฆ โฅ 0, ๐ฆ๐๐ < 0
1) Image of ๐ด contains a point โbelowโ ๐ 2) The region โbelowโ ๐ doesnโt intersect image of ๐ดthis is witnessed by normal vector to the image of ๐ด
This slide is not in the scope of the course
Strong Duality
373F21 - Nisarg Shah 62
โข Strong duality theorem:โข For any primal optimal ๐ฅโ and dual optimal ๐ฆโ, ๐๐๐ฅโ = ๐ฆโ ๐๐
โข Proof (by contradiction):
o Let ๐งโ = ๐๐๐ฅโ be the optimal primal value.
o Suppose optimal dual objective value > ๐งโ
o So, there is no ๐ฆ such that ๐ฆ๐๐ด โฅ ๐๐ and ๐ฆ๐๐ โค ๐งโ, i.e.,
Primal LP Dual LP
This slide is not in the scope of the course
Strong Duality
373F21 - Nisarg Shah 63
โข There is no ๐ฆ such that
โข By Farkasโ lemma, there is ๐ฅ and ๐ such that
โข Case 1: ๐ > 0o Note: ๐๐๐ฅ > ๐๐งโ and ๐ด๐ฅ = 0 = ๐๐.
o Divide both by ๐ to get ๐ด๐ฅ
๐= ๐ and ๐๐
๐ฅ
๐> ๐งโ
โข Contradicts optimality of ๐งโ
โข Case 2: ๐ = 0
o We have ๐ด๐ฅ = 0 and ๐๐๐ฅ > 0
o Adding ๐ฅ to optimal ๐ฅโ of primal improves objective value beyond ๐งโ โcontradiction
This slide is not in the scope of the course
Exercise: Formulating LPs
373F21 - Nisarg Shah 64
โข A canning company operates twocanning plants (A and B).
โข Three suppliers of fresh fruits:
โข Shipping costs in $/tonne:
โข Plant capacities and labour costs:
โข Selling price: $50/tonne, no limit
โข Objective: Find which plant should get how much supply from each grower to maximize profit
Exercise: Formulating LPs
373F21 - Nisarg Shah 66
โข Similarly to the brewery example from earlier:โข A brewery can invest its inventory of corn, hops and malt into
producing three types of beer
โข Per unit resource requirement and profit are as given below
โข The brewery cannot produce positive amounts of both A and B
โข Goal: maximize profit
Beverage Corn (kg) Hops (kg) Malt (kg) Profit ($)
A 5 4 35 13
B 15 4 20 23
C 10 7 25 15
Limit 500 300 1000
Exercise: Formulating LPs
373F21 - Nisarg Shah 67
โข Similarly to the brewery example from the beginning:โข A brewery can invest its inventory of corn, hops and malt into
producing three types of beer
โข Per unit resource requirement and profit are as given below
โข The brewery can only produce ๐ถ in integral quantities up to 100
โข Goal: maximize profit
Beverage Corn (kg) Hops (kg) Malt (kg) Profit ($)
A 5 4 35 13
B 15 4 20 23
C 10 7 25 15
Limit 500 300 1000
Exercise: Formulating LPs
373F21 - Nisarg Shah 68
โข Similarly to the brewery example from the beginning:โข A brewery can invest its inventory of corn, hops and malt into
producing three types of beer
โข Per unit resource requirement and profit are as given below
โข Goal: maximize profit, but if there are multiple profit-maximizing solutions, thenโฆ
o Break ties to choose those with the largest quantity of ๐ด
o Break any further ties to choose those with the largest quantity of ๐ต
Beverage Corn (kg) Hops (kg) Malt (kg) Profit ($)
A 5 4 35 13
B 15 4 20 23
C 10 7 25 15
Limit 500 300 1000
More Tricks
373F21 - Nisarg Shah 69
โข Constraint: ๐ฅ โค 3โข Replace with constraints ๐ฅ โค 3 and โ๐ฅ โค 3
โข What if the constraint is ๐ฅ โฅ 3?
โข Objective: minimize 3 ๐ฅ + ๐ฆโข Add a variable ๐ก
โข Add the constraints ๐ก โฅ ๐ฅ and ๐ก โฅ โ๐ฅ (so ๐ก โฅ |๐ฅ|)
โข Change the objective to minimize 3๐ก + ๐ฆ
โข What if the objective is to maximize 3 ๐ฅ + ๐ฆ?
โข Objective: minimize max(3๐ฅ + ๐ฆ, ๐ฅ + 2๐ฆ)โข Hint: minimizing 3 ๐ฅ + ๐ฆ in the earlier bullet was equivalent to
minimizing max(3๐ฅ + ๐ฆ,โ3๐ฅ + ๐ฆ)
โข โฆ