what is combinatorial optimization c bi t i l o ti i ti
play

What is Combinatorial Optimization? C bi t i l O ti i ti ? - PowerPoint PPT Presentation

What is Combinatorial Optimization? C bi t i l O ti i ti ? Ch Chapter 1 t 1 Given a set of variables, each associated with a Linear Programming g g value domain, and given constraints over the value domain and given constraints


  1. What is Combinatorial Optimization? C bi t i l O ti i ti ? Ch Chapter 1 t 1 Given a set of variables, each associated with a Linear Programming g g value domain, and given constraints over the value domain and given constraints over the variables, find an assignment of values to variables Paragraph 1 Paragraph 1 such that the constraints are satisfied and an such that the constraints are satisfied and an objective function over the variables is minimized First Insights (or maximized)! CS 149 - Intro to CO 2 Examples p Examples p – Knapsack Problem Knapsack Problem • Transportation Problem: A good produced at • Transportation Problem: A good produced at – Market Split Problem various factories needs to be distributed to – Network Problems different retailers. Each factory provides a specific different retailers. Each factory provides a specific supply, and each retailer has a specific demand. • Maximum Flow Also, the transportation cost per unit of the good • Minimum Spanning Tree for each factory/retailer pair is known. How can – Routing Problems the demand be met while minimizing • Shortest Path transportation costs? transportation costs? • Vehicle Routing V hi l R ti • Travelling Salesman Problem – Satisfiability Problem Satisfiability Problem CS 149 - Intro to CO 3 CS 149 - Intro to CO 4

  2. Examples – Transportation Problem p p Examples – Transportation Problem p p • Constants 110 6 90 – D r : demand of retailer r 6 – S f : supply of factory f 65 2 – c : cost of shipping one unit from f to r c fr : cost of shipping one unit from f to r 3 1 • Variables 2 60 – X fr : How many units are sent from factory f to retailer r fr 9 9 2 7 • Constraints 1 80 2 – Ê f X fr = D r for all retailers r – Ê r X fr ≤ S f Ê X ≤ S f for all factories f ll f t i f 120 • Objective 1 3 3 – Minimize Ê f c f X f Minimize Ê fr c fr X fr 4 95 CS 149 - Intro to CO 5 CS 149 - Intro to CO 6 How do we solve such problems? p Heuristic: Matrix-Minimum-Method 4 4 4 4 2 2 A A A A 1 1 2 2 3 3 6 6 1 1 2 2 3 3 6 6 4 4 2 2 2 2 0 A 2 3 4 A 2 3 4 2 3 3 8 8 8 8 1 1 1 1 B 4 6 8 7 B 4 6 8 7 5 5 C 5 2 7 C 5 2 7 4 4 3 3 4 4 3 3 5 5 5 5 6 6 2 2 7 7 B 7 7 B Cost: 0 2 2 2 2 C C CS 149 - Intro to CO 7 CS 149 - Intro to CO 8

  3. Heuristic: Matrix-Minimum-Method Heuristic: Matrix-Minimum-Method 2 2 2 0 2 0 A A A A 1 1 2 2 3 3 6 6 1 1 2 2 3 3 6 6 4 4 2 2 0 0 A 2 3 4 A 2 3 4 2 2 3 3 8 8 8 8 1 1 1 1 B 4 6 8 7 B 4 6 8 7 5 5 C 5 2 7 C 5 2 7 4 4 3 3 4 4 3 3 5 3 5 3 3 1 1 3 2 6 6 2 2 7 7 B 7 7 B 2 2 2 2 Cost: 4 Cost: 8 2 2 0 2 0 C C CS 149 - Intro to CO 9 CS 149 - Intro to CO 10 Heuristic: Matrix-Minimum-Method Heuristic: Matrix-Minimum-Method 0 0 0 0 A A A A 1 1 2 2 3 3 6 6 1 1 2 2 3 3 6 6 4 4 2 2 0 0 A 2 3 4 2 A 2 3 4 2 3 3 8 8 8 8 1 1 1 1 B 4 6 8 7 B 4 6 8 7 5 5 C 5 2 7 C 5 2 7 4 4 3 3 4 4 3 3 1 1 1 0 0 1 2 2 6 6 2 2 7 7 B 7 7 6 6 B 2 2 1 1 2 2 Cost: 14 Cost: 14 2 2 0 0 C C CS 149 - Intro to CO 11 CS 149 - Intro to CO 12

  4. Heuristic: Matrix-Minimum-Method Heuristic: Matrix-Minimum-Method 0 0 0 0 A A A A 1 1 2 2 3 3 6 6 1 1 2 2 3 3 6 6 0 0 4 4 2 2 0 0 A 2 3 4 A 2 3 4 2 2 3 3 8 8 8 8 1 1 1 1 B 4 6 8 7 B 4 6 8 7 6 5 5 C 5 2 7 C 5 2 7 4 4 3 3 4 4 3 3 0 0 0 0 2 2 6 6 2 2 B B 6 6 1 1 0 6 6 0 1 1 2 2 2 2 Cost: 20 Cost: 20 2 2 0 0 C C CS 149 - Intro to CO 13 CS 149 - Intro to CO 14 A 3 Heuristic: Matrix-Minimum-Method Can we improve this solution? p -2 2 1 B 0 0 0 0 A A A A 1 1 2 2 3 3 0 0 1 1 2 2 3 3 0 0 4 4 2 2 0 0 2 A 2 3 4 2 A 2 3 4 2 3 3 8 8 8 8 1 1 1 1 B 4 6 8 7 B 4 6 8 7 6 4 6 5 5 C 5 2 7 C 5 2 7 4 4 3 3 4 4 3 3 2 2 0 0 0 0 2 2 6 6 2 2 0 0 B 0 0 B 1 1 2 2 1 1 2 2 Cost: 68 Cost: 68 2 2 0 0 C C CS 149 - Intro to CO 15 CS 149 - Intro to CO 16

  5. A 3 Can we improve this solution? p Can we improve this solution? p -1 1 2 B 0 0 0 0 A A A A 1 1 2 2 3 3 0 0 1 1 2 2 3 3 0 0 4 4 2 2 0 0 2 4 4 A 2 3 4 A 2 3 4 3 3 8 8 8 8 1 1 1 1 B 4 6 8 7 B 4 6 8 7 4 2 2 5 5 C 5 2 7 C 5 2 7 4 4 3 3 4 4 3 3 2 2 2 2 0 0 0 0 2 6 6 2 2 B B 0 0 3 3 1 1 0 0 3 3 2 2 2 2 Cost: 64 Cost: 62 2 2 0 0 C C CS 149 - Intro to CO 17 CS 149 - Intro to CO 18 Analysis y Examples p • What did we do? • What did we do? • Diet Problem • Diet Problem – We constructed a feasible solution first. – given a set of foods – We then changed our solution while maintaining • each containing a certain amount of ingredients each containing a certain amount of ingredients feasibility until no further improvement by re-routing f ibilit til f th i t b ti (vitamins, calories, minerals, etc) was possible. • each food associated with a certain price per kg – Each ingredient needs to be provided in sufficient • Open questions: amounts in order to survive. – Is the solution that we found optimal? – Decide what amounts of each food should be – Decide what amounts of each food should be – If so, will our method always construct an overall purchased so that survival is guaranteed while the optimal solution? costs are minimized! – Can we generalize this procedure for other Can we generalize this procedure for other optimization problems? CS 149 - Intro to CO 19 CS 149 - Intro to CO 20

  6. Examples – Diet Problem p Examples – Diet Problem p B B M M • Constants • Constants Amount Amount needed – m i : critical minimum amounts that are needed for each ingredient i [g] – a if : amount of each ingredient i in food f t f h i di t i i f d f Cost/kg – c f : cost per kg of food f 25 15 [$] • Variables Variables Carbs – X f : How many kg of food f shall be purchased? 10 25 500 [%] • Constraints – Ê f X f a if ¥ m i for all ingredients i Fat [%] 10 5 250 • Objective Protein Protein – Minimize Ê f c f X f Minimize Ê c X 15 15 20 20 600 600 [%] CS 149 - Intro to CO 21 CS 149 - Intro to CO 22 Examples – Diet Problem p Examples – Diet Problem p B B M M Amount Amount B [kg] B [kg] needed 5 [g] $ $ 4 Cost/kg 25 15 Minimize 25M + 15B Minimize 25M + 15B [$] Carbs 10 25 500 100M + 250B ¥ 500 100M + 250B ¥ 500 [%] 2 Fat [%] 10 5 250 100M + 50B ¥ 250 100M + 50B ¥ 250 M = 1.6 B = 1.8 0 Protein Protein 15 15 20 20 600 600 150M + 200B ¥ 600 150M 200B 600 150M + 200B ¥ 600 150M 200B 600 [%] M [kg] 0 2 4 5 CS 149 - Intro to CO 23 CS 149 - Intro to CO 24

  7. Examples p Examples – Production Planning p g 80 80 • Production Planning • Production Planning 55 – given a set of resources that are available in limited amounts 35 – given goods that we want to produce whereby for 30 each good we need a specific amount of each resource resource 27 – Every unit of each good produced yields a certain profit. p – Decide what amount of each good should be produced such that the resources suffice and the 32 profit is maximized! profit is maximized! CS 149 - Intro to CO 25 CS 149 - Intro to CO 26 Examples – Production Planning p g Examples – Production Planning p g X 1 X 1 + 2 X 2 ≤ 80 2 X 2 80 80 80 • Constants • Constants – a r : maximum available amount of resource r X 1 + X 2 ≤ 55 55 – c rg : how many units of resource r are needed for the X 1 ≤ 35 35 1 production of one unit of good g d ti f it f d 30 X 1 X 2 ≤ 30 – p g : profit per unit of good g produced • Variables Variables X 2 ≤ 27 27 – X g : How many units of good g shall be produced? • Constraints – Ê g X g c rg ≤ a r for all resources r X 2 • Objective X 1 ≤ 32 32 – Maximize Ê g p g X g Maximize Ê p X CS 149 - Intro to CO 27 CS 149 - Intro to CO 28

Recommend


More recommend