15 780 graduate artificial intelligence integer
play

15-780 Graduate Artificial Intelligence: Integer programming J. - PowerPoint PPT Presentation

15-780 Graduate Artificial Intelligence: Integer programming J. Zico Kolter (this lecture) and Ariel Procaccia Carnegie Mellon University Spring 2017 1 Outline Introduction Integer programming Solving integer programs Extensions and


  1. 15-780 – Graduate Artificial Intelligence: Integer programming J. Zico Kolter (this lecture) and Ariel Procaccia Carnegie Mellon University Spring 2017 1

  2. Outline Introduction Integer programming Solving integer programs Extensions and discussion 2

  3. Logistics HW1 aiming to be out tomorrow night, will be due two weeks from posting date Midterm is moving to 2/27 instead of 3/1 3

  4. Outline Introduction Integer programming Solving integer programs Extensions and discussion 4

  5. Recall linear program A large factory makes tables and chairs. Each table returns a profit of $200 and each chair a profit of $100. Each table takes 1 unit of metal and 3 units of wood and each chair takes 2 units of metal and 1 unit of wood. The factory has 6K units of metal and 9K units of wood. How many tables and chairs should the factory make to maximize profit? x 2 (chairs) 3 x 1 + x 2 ≤ 9 (wood) Profit = 2 x 1 + x 2 x 1 + 2 x 2 ≤ 6 (metal) x 1 (tables) 5

  6. Recall linear program A large factory makes tables and chairs. Each table returns a profit of $200 and each chair a profit of $100. Each table takes 1 unit of metal and 3 units of wood and each chair takes 2 units of metal and 1 unit of wood. The factory has 6K units of metal and 9K units of wood. How many tables and chairs should the factory make to maximize profit? x 2 (chairs) x 1 (tables) 6

  7. Recall linear program A large factory makes tables and chairs. Each table returns a profit of $200 and each chair a profit of $100. Each table takes 1 unit of metal and 3 units of wood and each chair takes 2 units of metal and 1 unit of wood. The factory has 6 units of metal and 9 units of wood. How many tables and chairs should the factory make to maximize profit? x 2 (chairs) x 1 (tables) 7

  8. Recall linear program A large factory makes tables and chairs. Each table returns a profit of $200 and each chair a profit of $100. Each table takes 1 unit of metal and 3 units of wood and each chair takes 2 units of metal and 1 unit of wood. The factory has 6 units of metal and 9 units of wood. How many tables and chairs should the factory make to maximize profit? x 2 (chairs) x 1 (tables) 8

  9. Challenges of integer programming The above example was “easy” in that the rounded solution to the LP happened to also be a solution to the integer program In general, integer solution can be arbitrarily far from the LP solution x 2 x 1 Can be hard to even find a feasible solution that is integer valued, e.g., imagine the task of finding an integer solution to some arbitrary set of linear equations 𝐵𝑦 = 𝑐 9

  10. Many applications (see next lecture) Path planning with obstacles Many problems in game theory Constraint satisfaction problems (Exact) most likely assignment in graphical models Scheduling and unit commitment Kidney exchange 10

  11. Outline Introduction Integer programming Solving integer programs Extensions and discussion 11

  12. Integer linear programming An optimization problem like linear programming, except that variables are required to take on integer values (e.g., in inequality form) 𝑑 푇 𝑦 minimize 푥 subject to 𝐻𝑦 ≤ ℎ 𝑦 ∈ ℤ 푛 (integers) Not a convex problem, because of integer constraint (set of all integers is not a convex set) Can also consider mixed integer linear programming , with both integer and non-integer variables 𝑑 푇 𝑦 minimize 푥 subject to 𝐻𝑦 ≤ ℎ 𝑦 푖 ∈ ℤ , 𝑗 ∈ ℐ ⊆ 1, … , 𝑜 12

  13. Other variations For simplicity, in this lecture we will focus on binary integer programming, where 𝑦 variables are in {0,1} 𝑑 푇 𝑦 minimize 푥 subject to 𝐻𝑦 ≤ ℎ 0,1 푛 𝑦 ∈ This is just for ease of presentation, we will discuss how to adapt all these methods for general integer variables Techniques we present are actually largely applicable to any mixed integer programming problem with convex objective and constraints (other than integer constraint) 13

  14. Difficult of binary integer programming Theorem: Binary integer programming is NP-hard Proof: We show this by reduction from 3SAT Recall the 3SAT satisfiability problem: given binary variables 𝑨 1 , … 𝑨 푛 ∈ determine if there is some assignment that satisfies a set 𝑈𝑠𝑣𝑓 , 𝐺𝑏𝑚𝑡𝑓 of clauses in conjunctive normal form, e.g., 𝑨 1 ∨ 𝑨 2 ∨ ¬ 𝑨 3 ∧ 𝑨 2 ∨ ¬ 𝑨 4 ∨ 𝑨 5 ∧ ⋯ Formulate this as a binary integer program: 𝑦 1 , … , 𝑦 푛 ∈ 0,1 , with e.g., 𝑨 1 ∨ 𝑨 2 ∨ ¬ 𝑨 3 ⟺ 𝑦 1 + 𝑦 2 + 1 − 𝑦 3 ≥ 1 Finding feasible solution to BIP equivalent to finding satisfying assignment 14

  15. Outline Introduction Integer programming Solving integer programs Extensions and discussion 15

  16. Solving integer programs How can we go about finding the solution to the binary integer program 𝑑 푇 𝑦 minimize 푥 subject to 𝐻𝑦 ≤ ℎ 0,1 푛 𝑦 ∈ Naïve solution: 2 푛 possible assignments of all 𝑦 variables, just try each one, return solution with minimum objective value out of those that satisfy constraints In the worst case, we can’t do any better than this, but often it is possible to solve the problem much faster in practice 16

  17. Key idea: relaxing integer constraints Consider alternate optimization problem where we relax the constraint 𝑦 푖 ∈ {0,1} to be 𝑦 푖 ∈ 0,1 ≡ 0 ≤ 𝑦 푖 ≤ 1 , forming the linear program: 𝑑 푇 𝑦 minimize 푥 subject to 𝐻𝑦 ≤ ℎ 𝑦 ∈ [0,1] 푛 Key point #1: if the solution to this linear program 𝑦 ⋆ has all integer values, then it is also the solution to the integer program Key point #2: the optimal objective for the linear program will be lower than that of the binary integer program Both points follow trivially from the fact that 0,1 푛 ⊂ 0,1 푛 17

  18. Integer solutions Integer solutions are more common than you may naively expect, will happen whenever the vertices of the polytope all have integer values E.g., consider trivial optimization problem 𝑑 푇 𝑦 minimize 푥 subject to 𝑦 ∈ 0,1 푛 Solution is: ⋆ = { 1 if 𝑑 푖 ≤ 0 𝑦 푖 0 otherwise 18

  19. Poll: integer solutions Consider the linear program, with 𝑑 and ℎ chosen so problem is feasible : 𝑑 푇 𝑦 minimize 푥 subject to 𝑦 ∈ 0,1 푛 𝑦 푖 − 𝑦 푖 + 1 ≤ ℎ 푖 , 𝑗 = 1, … , 𝑜 − 1 Will the solutions to this linear program always take on integer values? Yes, for all values of 𝑑 ∈ ℝ 푛 and ℎ ∈ ℝ 푛−1 1. Yes, for any 𝑑 ∈ ℝ 푛 but only for ℎ ∈ ℤ 푛−1 2. Yes, but only for 𝑑 ∈ ℤ 푛 and ℎ ∈ ℤ 푛−1 3. Not necessarily, even for 𝑑 ∈ ℤ 푛 and ℎ ∈ ℤ 푛−1 4. 19

  20. Branch and bound LP relaxation is an quickly-computable approximation which gives us a lower bound on the true solution: sounds a lot like an admissible heuristic… This leads us to the branch and bound algorithm: this is just greedy informed search (i.e., 𝑔 𝑡 = ℎ ( 𝑡 ) , no path cost, just heuristic cost), applied using LP relaxation as the heuristic Repeat: 1. Choose relaxed problem from frontier with lowest cost 2. If solution is not integer valued, pick a non-integer variable 𝑦 푖 and add problems with additional constraints 𝑦 푖 = 0 and 𝑦 푖 = 1 3. If solution is integer valued, return 20

  21. Branch and bound in more detail A more detailed description of branch and bound Function: Solve-Relaxation( 𝒟 ) : - Solve linear program plus additional constraints in 𝒟 - Return (objective value 𝑔 ⋆ , solution 𝑦 ⋆ , and constraint set 𝒟 ) Algorithm: Branch-and-Bound - Push Solve-Relaxation( {} ) on to frontier set - Repeat while frontier is not empty: 1. Get lowest cost solution from frontier: ( 𝑔 , 𝑦 , 𝒟 ) 2. If 𝑨 is integer valued, return 𝑦 3. Else, choose some 𝑦 푖 not integer valued and add Solve-Relaxation( 𝒟 ∪ { 𝑦 푖 = 0} ),Solve-Relaxation( 𝒟 ∪ { 𝑦 푖 = 1} ), to the frontier 21

  22. Branch and bound example minimize 2 𝑦 1 + 𝑦 2 − 2 𝑦 3 푥 subject to 0.7 𝑦 1 + 0.5 𝑦 2 + 𝑦 3 ≥ 1.8 𝑦 푖 ∈ 0,1 , 𝑗 = 1,2,3 22

  23. Branch and bound example minimize 2 𝑦 1 + 𝑦 2 − 2 𝑦 3 푥 subject to 0.7 𝑦 1 + 0.5 𝑦 2 + 𝑦 3 ≥ 1.8 𝑦 푖 ∈ [0,1], 𝑗 = 1,2,3 Frontier Search tree 𝑔 ⋆ = − 0.143, 𝑦 ⋆ = 0.43,1,1 , 𝒟 = {} {} 23

  24. Branch and bound example minimize 2 𝑦 1 + 𝑦 2 − 2 𝑦 3 푥 subject to 0.7 𝑦 1 + 0.5 𝑦 2 + 𝑦 3 ≥ 1.8 𝑦 푖 ∈ [0,1], 𝑗 = 1,2,3 Frontier Search tree 𝑔 ⋆ = − 0.143, 𝑦 ⋆ = 0.43,1,1 , 𝒟 = {} {} 𝑔 ⋆ = 0.2, 𝑦 ⋆ = 1, 0.2, 1 , 𝒟 = 𝑦 1 = 1 𝑔 ⋆ = ∞ , 𝑦 ⋆ = ∅ , 𝒟 = 𝑦 1 = 0 x 1 = 0 x 1 = 1 24

  25. Branch and bound example minimize 2 𝑦 1 + 𝑦 2 − 2 𝑦 3 푥 subject to 0.7 𝑦 1 + 0.5 𝑦 2 + 𝑦 3 ≥ 1.8 𝑦 푖 ∈ [0,1], 𝑗 = 1,2,3 Frontier Search tree 𝑔 ⋆ = − 0.143, 𝑦 ⋆ = 0.43,1,1 , 𝒟 = {} {} 𝑔 ⋆ = 0.2, 𝑦 ⋆ = 1, 0.2, 1 , 𝒟 = 𝑦 1 = 1 𝑔 ⋆ = 1, 𝑦 ⋆ = 1,1, 1 , 𝒟 = 𝑦 1 = 1, 𝑦 2 = 1 x 1 = 0 x 1 = 1 𝑔 ⋆ = ∞ , 𝑦 ⋆ = ∅ , 𝒟 = 𝑦 1 = 0 𝑔 ⋆ = ∞ , 𝑦 ⋆ = ∅ , 𝒟 = 𝑦 1 = 1, 𝑦 2 = 0 x 2 = 0 x 2 = 1 25

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend