Instructors: Fei Fang (This Lecture) and Dave Touretzky

Slides:



Advertisements
Similar presentations
BU Decision Models Integer_LP1 Integer Optimization Summer 2013.
Advertisements

Linear Programming (LP) (Chap.29)
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Introduction to Algorithms
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
Lecture 10: Integer Programming & Branch-and-Bound
5-1 Chapter 5 Tree Searching Strategies. 5-2 Satisfiability problem Tree representation of 8 assignments. If there are n variables x 1, x 2, …,x n, then.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
Computational Methods for Management and Economics Carla Gomes
Approximation Algorithms
1 Maximum matching Max Flow Shortest paths Min Cost Flow Linear Programming Mixed Integer Linear Programming Worst case polynomial time by Local Search.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Review of Reservoir Problem OR753 October 29, 2014 Remote Sensing and GISc, IST.
LP formulation of Economic Dispatch
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
Decision Procedures An Algorithmic Point of View
ENCI 303 Lecture PS-19 Optimization 2
Design Techniques for Approximation Algorithms and Approximation Classes.
Types of IP Models All-integer linear programs Mixed integer linear programs (MILP) Binary integer linear programs, mixed or all integer: some or all of.
Integer Programming Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be.
To accompany Quantitative Analysis for Management, 8e by Render/Stair/Hanna 11-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 11.
Chapter 1. Formulations 1. Integer Programming  Mixed Integer Optimization Problem (or (Linear) Mixed Integer Program, MIP) min c’x + d’y Ax +
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
15.053Tuesday, April 9 Branch and Bound Handouts: Lecture Notes.
1 Outline:  Optimization of Timed Systems  TA-Modeling of Scheduling Tasks  Transformation of TA into Mixed-Integer Programs  Tree Search for TA using.
1 System Planning 2013 Lecture 7: Optimization Appendix A Contents: –General about optimization –Formulating optimization problems –Linear Programming.
Highline Class, BI 348 Basic Business Analytics using Excel Chapter 08 & 09: Introduction to Linear Programing 1.
Implicit Hitting Set Problems Richard M. Karp Erick Moreno Centeno DIMACS 20 th Anniversary.
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
IE 312 Review 1. The Process 2 Problem Model Conclusions Problem Formulation Analysis.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Discrete Optimization
School of Computer Science & Engineering
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Lap Chi Lau we will only use slides 4 to 19
Nonlinear Programming Prepared by Lee Revere and John Large
Integer Programming An integer linear program (ILP) is defined exactly as a linear program except that values of variables in a feasible solution have.
Signal processing and Networking for Big Data Applications: Lecture 9 Mix Integer Programming: Benders decomposition And Branch & Bound NOTE: To change.
Lecture on Design and Analysis of Computer Algorithm
Topics in Algorithms Lap Chi Lau.
Solver & Optimization Problems
5.3 Mixed-Integer Nonlinear Programming (MINLP) Models
The minimum cost flow problem
Lecture 11: Tree Search © J. Christopher Beck 2008.
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Local Search Algorithms
Instructor: Vincent Conitzer
Artificial Intelligence Problem solving by searching CSC 361
Chapter 5. Optimal Matchings
Dr. Arslan Ornek IMPROVING SEARCH
1.3 Modeling with exponentially many constr.
Linear Programming.
5.3 Mixed Integer Nonlinear Programming Models
Chapter 6. Large Scale Optimization
Integer Programming (정수계획법)
Integer Linear Programming
Instructors: Fei Fang (This Lecture) and Dave Touretzky
Chapter 6. Large Scale Optimization
Chapter 1. Formulations (BW)
Integer Programming (정수계획법)
Flow Feasibility Problems
Chapter 1. Formulations.
Branch-and-Bound Algorithm for Integer Program
Chapter 6. Large Scale Optimization
Local Search Algorithms
Discrete Optimization
Presentation transcript:

Instructors: Fei Fang (This Lecture) and Dave Touretzky Artificial Intelligence: Representation and Problem Solving Optimization (3): (Mixed) Integer Linear Programming 15-381 / 681 Instructors: Fei Fang (This Lecture) and Dave Touretzky feifang@cmu.edu Wean Hall 4126 Don’t expect them to remember, just use as resource 12/8/2018

Nonconvex but continuous optimization Linear program Recap Convex optimization 𝑓 is a convex function and ℱ is a convex set Gradient descent leads to global optimum Nonconvex but continuous optimization Gradient descent leads to local optima Linear program 𝑓 is a linear function and ℱ is a convex polytope This section: 𝑓 is a linear function and ℱ is defined by a set of linear constraints + integer constraints min 𝑥 𝑓(𝑥) s.t. 𝑥∈ℱ Properties Finite options (brute force when the problem scale is small) (Often) NP-Complete Solution approach Brute force when the problem scale is small Fei Fang 12/8/2018

(Mixed) Integer Linear Program How to solve a MILP Outline (Mixed) Integer Linear Program How to solve a MILP Formulate/Convert to MILP Fei Fang 12/8/2018

(Mixed) Integer Linear Program: Definition A special case of non-convex optimization problem An optimization problem whose optimization objective is a linear function and feasible region is defined by a set of linear constraints + integer constraints 𝑐∈ ℝ 𝑛 𝐺∈ ℝ 𝑚×𝑛 ,ℎ∈ ℝ 𝑚 0< 𝐽 𝑧 ≤𝑛 Integer Linear Program (ILP): 𝐽 𝑧 =𝑛 max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ 𝑥 𝑖 ∈ℤ,𝑖∈ 𝐽 𝑧 Can be minimization Can be ≥ℎ or =ℎ Efficient solvers / code packages available! Fei Fang 12/8/2018

(Mixed) Integer Linear Program: Example Example: Maximize Profit in Manufacturing max 𝑥,𝑦 30𝑥+30𝑦 s.t. 0.2𝑥+0.5𝑦≤90 4𝑥+2𝑦≤800 𝑥≥0,𝑦≥0 𝑥,𝑦∈ℤ Original product can be: cloth, rope etc Price Labor Machine Product 1 $30 0.2 hour 4 hour Product 2 0.5 hour 2 hour Total <=90 <=800 Earphone Charger Fei Fang 12/8/2018

Binary Linear Program: Definition Binary Linear Program (BIP): All variables are restricted to take value 0 or 1 max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ 𝑥 𝑖 ∈ 0,1 ,∀𝑖 Fei Fang 12/8/2018

Binary Linear Program: Example 0-1 Knapsack Maximum weight =10 How to select items to maximize total value? Items 1 2 3 4 5 Weight 6 7 Value 9 You have a knapsack, and the maximum weight you can take is 10 Fei Fang 12/8/2018

Binary Linear Program: Example 0-1 Knapsack 𝑛 indivisible items. Item 𝑖 has weight 𝑤 𝑖 , value 𝑣 𝑖 . Maximum weight is 𝑊 (𝑊≤ 𝑖 𝑤 𝑖 ) How to pick the items to maximize total value? You have a knapsack, and the maximum weight you can take is 10 Fei Fang 12/8/2018

(Mixed) Integer Linear Program How to solve a MILP Outline (Mixed) Integer Linear Program How to solve a MILP Formulate/Convert to MILP Fei Fang 12/8/2018

LP Relaxation LP relaxation of an MILP or BLP is the LP with the same linear constraints LP Relaxation MILP max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ 𝑥 𝑖 ∈ℤ,𝑖∈ 𝐽 𝑧 max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ BLP LP Relaxation max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ 𝑥 𝑖 ∈ 0,1 ,∀𝑖 max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ 𝑥 𝑖 ∈[0,1] Fei Fang 12/8/2018

Quiz 1: LP Relaxation Let 𝑥 ∗ , 𝑓 ∗ be the optimal solution and the optimal value of a MILP. Let 𝑥 ∗ , 𝑓 ∗ be the optimal solution and the optimal value of the LP relaxation. Which of the following are true? A: 𝑥 ∗ = 𝑥 ∗ B: 𝑓 ∗ ≤ 𝑓 ∗ if it is a maximization problem C: 𝑓 ∗ ≤ 𝑓 ∗ if it is a minimization problem D: 𝑓 ∗ ≥ 𝑓 ∗ if it is a maximization problem E: 𝑓 ∗ ≥ 𝑓 ∗ if it is a minimization problem B,E MILP LP Relaxation max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ 𝑥 𝑖 ∈ℤ,𝑖∈ 𝐽 𝑧 max 𝑥 𝑐 𝑇 𝑥 s.t. 𝐺𝑥≤ℎ Fei Fang 12/8/2018

Quiz 2: (Mixed) Integer Linear Program Which are optimal solutions? (137.5,125) (138,125) 137,125 138,124 None of above max 𝑥,𝑦 30𝑥+30𝑦 s.t. 0.2𝑥+0.5𝑦≤90 4𝑥+2𝑦≤800 𝑥≥0,𝑦≥0 𝑥,𝑦∈ℤ 0.2𝑥+0.5𝑦=90 4𝑥+2𝑦=800 Fei Fang 12/8/2018

How to solve Is it sufficient to consider integer points around the corresponding LP solution? No! Solution to the MILP can be arbitrarily far from the solution of the corresponding LP (relaxing all the integer constraints) Sometimes even hard to find a feasible integer point Fei Fang 12/8/2018

For Binary Linear Program (BLP) How to solve For Binary Linear Program (BLP) Discrete optimization problem Naïve approach: Enumerate all the possibilities Can apply uninformed or informed search Natural tree structure Items 1 2 3 4 5 Weight 6 7 Value 9 max 4𝑥 1 +3 𝑥 2 +6 𝑥 3 +9 𝑥 4 +5 𝑥 5 s.t. 5𝑥 1 +4 𝑥 2 +2 𝑥 3 +6 𝑥 4 +7 𝑥 5 ≤10 𝑥 𝑖 ∈{0,1} Fei Fang 12/8/2018

Depth-First Search for BLP max 4𝑥 1 +3 𝑥 2 +6 𝑥 3 +9 𝑥 4 +5 𝑥 5 s.t. 5𝑥 1 +4 𝑥 2 +2 𝑥 3 +6 𝑥 4 +7 𝑥 5 ≤10 𝑥 𝑖 ∈{0,1} Fei Fang 12/8/2018

Recall: Informed Search function BEST-FIRST-SEARCH (problem, EVAL-FN) returns a solution sequence inputs: problem, a problem EVAL-FN, an evaluation function Queuing-Fn ← a function that orders nodes by EVAL-FN return GENERAL-SEARCH (problem, Queuing-Fn) function GREEDY-SEARCH (problem) returns a solution or failure return BEST-FIRST-SEARCH (problem, h) 𝐴 ∗ search: Best-first-search with EVAL-FN 𝑓(𝑧)=𝑔(𝑧)+ ℎ(𝑧) where ℎ(𝑧) is an admissible heuristic for node 𝑧 𝑔 𝑧 =path cost up to node 𝑧, ℎ(𝑧)=heuristic estimate of distance to go In a minimization problem, ℎ(𝑧) never overestimates the distance to go In a maximization problem, ℎ(𝑧) never underestimates the value of the remaining path Optimal for tree search Fei Fang 12/8/2018

For Binary Linear Program (BLP) How to solve For Binary Linear Program (BLP) Discrete optimization problem Naïve approach: Enumerate all the possibilities Can apply uninformed or informed search Natural tree structure Vanilla branch and bound (BnB)=Best-first-search with EVAL-FN 𝑓(𝑧)= optimal value of LP relaxation at node 𝑧 Fei Fang 12/8/2018

Evaluation Function in Branch and Bound LP relaxation at node 𝑏 𝑎 max 4𝑥 1 +3 𝑥 2 +6 𝑥 3 +9 𝑥 4 +5 𝑥 5 s.t. 5𝑥 1 +4 𝑥 2 +2 𝑥 3 +6 𝑥 4 +7 𝑥 5 ≤10 𝑥 𝑖 ∈[0,1],𝑖=1..5 𝑥 1 =0 𝑥 1 =0 𝑥 1 =1 𝑏 𝑐 𝑓 𝑧 = optimal value of LP relaxation at node 𝑧 LP relaxation provides a upper bound of the objective value of any solution with a path through 𝑧 if it is a maximization problem (lower bound if minimization) Never underestimates the real value of the whole path given the path goes through 𝑧 for maximization problem (never overestimate the total cost for minimization) 𝑓 𝑧 −(path value up to 𝑧) is an admissible heuristic Fei Fang 12/8/2018

For Binary Linear Program (BLP) How to solve For Binary Linear Program (BLP) Discrete optimization problem Naïve approach: Enumerate all the possibilities Can apply uninformed or informed search Natural tree structure Vanilla branch and bound (BnB)=Best-first-search with EVAL-FN 𝑓(𝑧)= optimal value of LP relaxation at node 𝑧 Optimality guaranteed Fei Fang 12/8/2018

For Binary Linear Program (BLP) How to solve For Binary Linear Program (BLP) Discrete optimization problem Naïve approach: Enumerate all the possibilities Can apply uninformed or informed search Natural tree structure Vanilla branch and bound (BnB)=Best-first-search with EVAL-FN 𝑓(𝑧)= optimal value of LP relaxation at node 𝑧 Optimality guaranteed BnB with upper bound and lower bound (not required) Terminate early if we know the remaining nodes are not as good as a binary solution we have already found Fei Fang 12/8/2018

For MILP (not required) How to solve For MILP (not required) BnB: For each integer variable, branching a node by considering 𝑥 𝑖 ≤ 𝑥 𝑖 and 𝑥 𝑖 ≥ 𝑥 𝑖 where 𝑥 𝑖 is a non- integer value Branch and cut: use cutting planes (which are hyperplanes) to separate current non-integer solution and integer solutions Fei Fang 12/8/2018

How to solve Practically efficient solvers: Cplex, Gurobi, intlinprog (MATLAB), SCIP solver Fei Fang 12/8/2018

(Mixed) Integer Linear Program How to solve a MILP Outline (Mixed) Integer Linear Program How to solve a MILP Formulate/Convert to MILP Fei Fang 12/8/2018

Constraint satisfaction problem TWO+TWO=FOUR Fei Fang 12/8/2018

Constraint satisfaction problem TWO+TWO=FOUR Variables: 𝑥 𝑇 , 𝑥 𝑊 , 𝑥 𝑂 , 𝑥 𝐹 , 𝑥 𝑈 , 𝑥 𝑅 , 𝑐 1 , 𝑐 2 , 𝑐 3 min x,c 1 s.t. 𝑥 𝑂 + 𝑥 𝑂 = 𝑥 𝑅 +10 𝑐 1 𝑥 𝑊 + 𝑥 𝑊 + 𝑐 1 = 𝑥 𝑈 +10 𝑐 2 𝑥 𝑇 + 𝑥 𝑇 + 𝑐 2 = 𝑥 𝑂 +10 𝑐 3 0+ 𝑐 3 = 𝑥 𝐹 𝑥 𝑇 , 𝑥 𝐹 ∈{1,..,9} 𝑥 𝑊 , 𝑥 𝑂 , 𝑥 𝑈 , 𝑥 𝑅 ∈{0,..,9} 𝑐 1 , 𝑐 2 , 𝑐 3 ∈{0,1} Fei Fang 12/8/2018

Formulate a Problem as a MILP Sudoku Fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 subgrids that compose the grid (also called "boxes", "blocks", or "regions") contains all of the digits from 1 to 9 https://en.wikipedia.org/wiki/Sudoku Fei Fang 12/8/2018

Formulate a Problem as a MILP Sudoku Variables 𝑥 𝑖𝑗 𝑘 indicate if we place number 𝑘 in row 𝑖, col 𝑗 𝑆 𝑡 is the set of (row,col) index pairs of the 𝑡 𝑡ℎ groups (rows, columns, and subgrids) For example, 𝑆 1 ={ 1,1 , 1,2 ,…(1,9)} min 𝑥 1 s.t. 𝑥 𝑖𝑗 𝑘 ∈ 0,1 ,∀𝑖,𝑗,𝑘∈{1..9} 𝑖,𝑗 ∈ 𝑆 𝑡 𝑥 𝑖𝑗 𝑘 =1 ,∀𝑘∈ 1..9 ,∀𝑡∈{1..27} 𝑘 𝑥 𝑖𝑗 𝑘 =1 ,∀𝑖,𝑗∈{1..9} Fei Fang 12/8/2018

Formulate a Problem as a MILP Kidney Exchange Fei Fang 12/8/2018

Formulate a Problem as a MILP Kidney Exchange Given directed graph 𝐺=(𝑉,𝐸), where each node represent a patient-donor pair, and an edge 〈𝑢,𝑣〉 means donor of node 𝑢 can give one kidney to patient of node 𝑣 Find a set of disjoint cycles so as to maximize the number of nodes covered 6 2 1 4 5 3 7 8 Fei Fang 12/8/2018

Quiz 3: Kidney Exchange Given the graph below, what is the maximum number of patients that can get a kidney through kidney exchange assuming the length of each cycle should be less than or equal to 3? A: 3 B: 6 C: 7 D: 8 6 2 1 4 5 3 7 8 Fei Fang 12/8/2018

Formulate a Problem as a MILP Kidney Exchange Given directed graph 𝐺=(𝑉,𝐸), where each node represent a patient-donor pair, and an edge 〈𝑢,𝑣〉 means donor of node 𝑢 can give one kidney to patient of node 𝑣 Find a set of disjoint cycles so as to maximize the number of nodes covered Hint: enumerate all the cycles 6 2 1 4 5 3 7 8 Fei Fang 12/8/2018

No queen in the same row, column and diagnal 8-Queens Problem No queen in the same row, column and diagnal 𝑥 𝑖𝑗 : whether there is a queen on row 𝑖 col 𝑗 max x 𝑖 𝑗 𝑥 𝑖𝑗 s.t. 𝑥 𝑖𝑗 ∈{0,1} 𝑗 𝑥 𝑖𝑗 ≤1,∀𝑖∈{1..8} 𝑖 𝑥 𝑖𝑗 ≤1, ∀𝑗∈{1..8} 𝑖,𝑗:𝑖−𝑗=𝑘 𝑥 𝑖𝑗 =1,∀𝑘∈ −6,−5,…,5,6 𝑖,𝑗:𝑖+𝑗=𝑘 𝑥 𝑖𝑗 =1,∀𝑘∈ 2,3,…,14 Fei Fang 12/8/2018

Recall in the first lecture about optimization, we had 8-Queens Problem Recall in the first lecture about optimization, we had Can we rewrite it using only linear constraints + integer constraints? Variables 𝑥 𝑖 : row index of the queen in 𝑖 𝑡ℎ column min x 1 s.t. 𝑥 𝑖 ∈{1…8} 𝑥 𝑖 ≠ 𝑥 𝑗 ,∀𝑖,𝑗∈ 1..8 ,𝑖≠𝑗 𝑥 𝑖 − 𝑥 𝑗 ≠ 𝑖−𝑗 ,∀𝑖,𝑗∈ 1..8 ,𝑖≠𝑗 Fei Fang 12/8/2018

8-Queens Problem min x 1 s.t. 𝑥 𝑖 ∈{1…8} 𝑥 𝑖 ≠ 𝑥 𝑗 ,∀𝑖,𝑗∈ 1..8 ,𝑖≠𝑗 𝑥 𝑖 − 𝑥 𝑗 ≠ 𝑖−𝑗 ,∀𝑖,𝑗∈ 1..8 ,𝑖≠𝑗 Convert constraints (We omit the range of index below) min x 1 s.t. 𝑥 𝑖 ∈{1…8} 𝑥 𝑖 ≥ 𝑥 𝑗 +1 or 𝑥 𝑖 ≤ 𝑥 𝑗 −1, | 𝑥 𝑖 − 𝑥 𝑗 |≥|𝑖−𝑗|+1 or | 𝑥 𝑖 − 𝑥 𝑗 |≤|𝑖−𝑗|−1 Fei Fang 12/8/2018

Formulate a Problem as a MILP 8-Queens Problem Introduce variables 𝑦 𝑖𝑗 + , 𝑦 𝑖𝑗 − , set 𝐵=100 min x,𝑦,𝑧 1 s.t. 𝑥 𝑖 ∈{1…8} 𝑥 𝑖 −( 𝑥 𝑗 +1)+𝐵 𝑦 𝑖𝑗 + ≥0 𝑥 𝑖 −( 𝑥 𝑗 −1)−𝐵 𝑦 𝑖𝑗 − ≤0 𝑦 𝑖𝑗 + + 𝑦 𝑖𝑗 − ≤1 𝑦 𝑖𝑗 + , 𝑦 𝑖𝑗 − ∈{0,1} | 𝑥 𝑖 − 𝑥 𝑗 |≥|𝑖−𝑗|+1 or | 𝑥 𝑖 − 𝑥 𝑗 |≤|𝑖−𝑗|−1 min x 1 s.t. 𝑥 𝑖 ∈{1…8} 𝑥 𝑖 ≥ 𝑥 𝑗 +1 or 𝑥 𝑖 ≤ 𝑥 𝑗 −1 | 𝑥 𝑖 − 𝑥 𝑗 |≥|𝑖−𝑗|+1 or | 𝑥 𝑖 − 𝑥 𝑗 |≤|𝑖−𝑗|−1 Fei Fang 12/8/2018

General techniques for conversion At-most-one constraint: At most one of the options can be chosen Add variable 𝑥 𝑖 ∈{0,1} to represent whether or not option 𝑖 is chosen Add constraint 𝑖 𝑥 𝑖 =1 Fei Fang 12/8/2018

General techniques for conversion Constraint feasibility constraint: If 𝑦=0, then 𝑓 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 ≤𝑏 Choose a large enough constant 𝐵 such that 𝑓 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 −𝐵≤𝑏 is always satisfied (imagine 𝐵= +∞) Add constraint 𝑓 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 −𝐵𝑦≤𝑏 Fei Fang 12/8/2018

General techniques for conversion Alternative Constraints: 𝑓 1 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 ≤ 𝑏 1 or 𝑓 2 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 ≤ 𝑏 2 Introduce some large enough constants 𝐵 1 , 𝐵 2 such that 𝑓 𝑘 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 − 𝐵 𝑘 ≤ 𝑏 𝑘 always hold Introduce binary variables 𝑦 1 , 𝑦 2 Add constraints 𝑓 1 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 − 𝐵 1 𝑦 1 ≤ 𝑏 1 𝑓 2 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 − 𝐵 2 𝑦 2 ≤ 𝑏 2 𝑦 1 + 𝑦 2 ≤1 𝑦 1 , 𝑦 2 ∈{0,1} Fei Fang 12/8/2018

General techniques for conversion Conditional Constraints If 𝑓 1 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 > 𝑏 1 , then 𝑓 2 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 ≤ 𝑏 2 Equivalent to 𝑓 1 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 ≤ 𝑏 1 or 𝑓 2 𝑥 1 , 𝑥 2 ,…, 𝑥 𝑛 ≤ 𝑏 2 Apply techniques for alternative constraints Fei Fang 12/8/2018

General techniques for conversion Bilinear term 𝑥𝑦 where 𝑥∈{0,1} and 𝑦∈ [ 𝑦 𝑚𝑖𝑛 , 𝑦 𝑚𝑎𝑥 ] Introduce new variable 𝑧 Add constraints 𝑦 𝑚𝑖𝑛 𝑥≤𝑧≤ 𝑦 𝑚𝑎𝑥 𝑥 Fei Fang 12/8/2018

Summary Optimization Problems Convex Programs Mixed Integer Linear Programs Gradient Descent Linear Programs Branch and Bound Simplex Fei Fang 12/8/2018

(Mixed) Integer Linear Program: Additional Resources Textbook Applied Mathematical Programming, Chapter 9 By Bradley, Hax, and Magnanti (Addison-Wesley, 1977)  http://web.mit.edu/15.053/www/AMP.htm Online course https://ocw.mit.edu/courses/sloan-school-of-management/15-083j- integer-programming-and-combinatorial-optimization-fall- 2009/index.htm Fei Fang 12/8/2018

Acknowledgment Some slides are borrowed from previous slides made by J. Zico Kolter and Ariel Procaccia Fei Fang 12/8/2018