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
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Ch t 1 Chapter 1 Linear Programming g g Paragraph 1 Paragraph 1 First Insights What is C bi t i l O ti i ti ? Combinatorial Optimization?

Given a set of variables, each associated with a value domain and given constraints over the value domain, and given constraints over the variables, find an assignment of values to variables such that the constraints are satisfied and an such that the constraints are satisfied and an

  • bjective function over the variables is minimized

(or maximized)!

CS 149 - Intro to CO 2

Examples p

– Knapsack Problem Knapsack Problem – Market Split Problem – Network Problems

  • Maximum Flow
  • Minimum Spanning Tree

– Routing Problems

  • Shortest Path

V hi l R ti

  • Vehicle Routing
  • Travelling Salesman Problem

– Satisfiability Problem

CS 149 - Intro to CO 3

Satisfiability Problem

Examples p

  • Transportation Problem: A good produced at
  • Transportation Problem: A good produced at

various factories needs to be distributed to different retailers. Each factory provides a specific different retailers. Each factory provides a specific supply, and each retailer has a specific demand. Also, the transportation cost per unit of the good for each factory/retailer pair is known. How can the demand be met while minimizing transportation costs? transportation costs?

CS 149 - Intro to CO 4

slide-2
SLIDE 2

Examples – Transportation Problem p p

110

2

6 6 90 65

3

2 1 9 60

1

2 9 2 7 80 3 1 120

CS 149 - Intro to CO 5

4

3 95

Examples – Transportation Problem p p

  • Constants

– Dr: demand of retailer r – Sf: supply of factory f – c : cost of shipping one unit from f to r cfr: cost of shipping one unit from f to r

  • Variables

– Xfr: How many units are sent from factory f to retailer r

fr

  • Constraints

– Êf Xfr = Dr for all retailers r Ê X ≤ S f ll f t i f – Êr Xfr ≤ Sf for all factories f

  • Objective

– Minimize Êf cf Xf

CS 149 - Intro to CO 6

Minimize Êfr cfr Xfr

How do we solve such problems? p

A

4 6 1 2 3

A

4

1

2

3

6 2 4 8 1 2 3 A 2 3 4

1

5 4 5 3 8 7 B 4 6 8 C 5 2 7

B

7

2

5 4 3 6 7

C

2 2

CS 149 - Intro to CO 7

Heuristic: Matrix-Minimum-Method

A

2 6 4 1 2 3

A

2

1

2

3

6 4 2 4 8 1 2 3 A 2 3 4 2

1

5 4 5 3 8 7 B 4 6 8 C 5 2 7

2

5

B

7 4 3 6 7

C

2 2 Cost: 0

CS 149 - Intro to CO 8

slide-3
SLIDE 3

Heuristic: Matrix-Minimum-Method

A

2 6 1 2 3

A

2

1 3

6 2 4 8 1 2 3 A 2 3 4 2 3

1

5 4 5 3 8 7 B 4 6 8 C 5 2 7 3

2

5

B

7 4 3 6 2 7

C

2 2 2 Cost: 4

CS 149 - Intro to CO 9

Heuristic: Matrix-Minimum-Method

A

2 6 1 2 3

A

2

1 3

6 2 4 8 1 2 3 A 2 3 4 2 1 3

1

4 5 3 8 7 B 4 6 8 C 5 2 7 1 3

2

B

7 4 3 6 2 2 7

C

2 2 Cost: 8

CS 149 - Intro to CO 10

Heuristic: Matrix-Minimum-Method

A

6 1 2 3

A

1 3

6 2 4 8 1 2 3 A 2 3 4 2 1

1

4 5 3 8 7 B 4 6 8 C 5 2 7 1

2

B

7 4 3 6 2 2 7

C

2 2 Cost: 14

CS 149 - Intro to CO 11

Heuristic: Matrix-Minimum-Method

A

6 1 2 3

A

1 3

6 2 4 8 1 2 3 A 2 3 4 2 1

1

4 5 3 8 7 B 4 6 8 C 5 2 7 6 1

2

B

7 4 3 6 2 2 1 6 7

C

2 2 Cost: 14 1

CS 149 - Intro to CO 12

slide-4
SLIDE 4

Heuristic: Matrix-Minimum-Method

A

6 1 2 3

A

1 3

6 2 4 8 1 2 3 A 2 3 4 2

1

4 5 3 8 7 B 4 6 8 C 5 2 7 6

2

B

4 3 6 2 2 1 6

C

2 2 Cost: 20 1

CS 149 - Intro to CO 13

Heuristic: Matrix-Minimum-Method

A

6 1 2 3

A

1 3

6 2 4 8 1 2 3 A 2 3 4 2

1

4 5 3 8 7 B 4 6 8 C 5 2 7 6 6

2

B

4 3 6 2 2 1 6

C

2 2 Cost: 20 1

CS 149 - Intro to CO 14

Heuristic: Matrix-Minimum-Method

A

1 2 3

A

1 3

2 4 8 1 2 3 A 2 3 4 2

1

4 5 3 8 7 B 4 6 8 C 5 2 7 6

2

B

4 3 6 2 2 1

C

2 2 Cost: 68 1

CS 149 - Intro to CO 15

Can we improve this solution?

3 A

  • 2

A

p

1 2 3 B 1 2

A

1 3

2 4 8 1 2 3 A 2 3 4 2 2

1

4 5 3 8 7 B 4 6 8 C 5 2 7 6 4 2

2

B

4 3 6 2 2 1 2

C

2 2 Cost: 68 1

CS 149 - Intro to CO 16

slide-5
SLIDE 5

Can we improve this solution?

3 A

  • 1

A

p

1 2 3 B 2 1 4

A

1 3

2 4 8 1 2 3 A 2 3 4 2 2 4

1

4 5 3 8 7 B 4 6 8 C 5 2 7 2 3

2

B

4 3 6 2 2 1 2 3

C

2 2 Cost: 64 1

CS 149 - Intro to CO 17

Can we improve this solution?

A

p

1 2 3 4

A

1 3

2 4 8 1 2 3 A 2 3 4

1

4 5 3 8 7 B 4 6 8 C 5 2 7 2 2 3

2

B

4 3 6 2 2 3

C

2 2 Cost: 62

CS 149 - Intro to CO 18

Analysis y

  • What did we do?
  • What did we do?

– We constructed a feasible solution first. – We then changed our solution while maintaining f ibilit til f th i t b ti feasibility until no further improvement by re-routing was possible.

  • Open questions:

– Is the solution that we found optimal? – If so, will our method always construct an overall

  • ptimal solution?

– Can we generalize this procedure for other

CS 149 - Intro to CO 19

Can we generalize this procedure for other

  • ptimization problems?

Examples p

  • Diet Problem
  • Diet Problem

– given a set of foods

  • each containing a certain amount of ingredients

each containing a certain amount of ingredients (vitamins, calories, minerals, etc)

  • each food associated with a certain price per kg

– Each ingredient needs to be provided in sufficient amounts in order to survive. – Decide what amounts of each food should be – Decide what amounts of each food should be purchased so that survival is guaranteed while the costs are minimized!

CS 149 - Intro to CO 20

slide-6
SLIDE 6

Examples – Diet Problem

Amount

p

M B Amount needed [g] M B Cost/kg [$] 25 15 Carbs [%] 10 25 500 Fat [%] 10 5 250 Protein 15 20 600

CS 149 - Intro to CO 21

Protein [%] 15 20 600

Examples – Diet Problem p

  • Constants
  • Constants

– mi: critical minimum amounts that are needed for each ingredient i t f h i di t i i f d f – aif : amount of each ingredient i in food f – cf: cost per kg of food f

  • Variables

Variables

– Xf: How many kg of food f shall be purchased?

  • Constraints

– Êf Xf aif ¥ mi for all ingredients i

  • Objective

Minimize Ê c X

CS 149 - Intro to CO 22

– Minimize Êf cf Xf

Examples – Diet Problem

Amount

p

M B Amount needed [g] M B Cost/kg [$] 25 15 Minimize 25M + 15B Carbs [%] 10 25 500 100M + 250B ¥ 500 Fat [%] 10 5 250 Protein 15 20 600 100M + 50B ¥ 250 150M 200B 600

CS 149 - Intro to CO 23

Protein [%] 15 20 600 150M + 200B ¥ 600

Examples – Diet Problem p

B [kg] B [kg] 5 $ Minimize 25M + 15B 4 $ 100M + 250B ¥ 500 2 100M + 50B ¥ 250 150M 200B 600 M = 1.6 B = 1.8

CS 149 - Intro to CO 24

150M + 200B ¥ 600 M [kg] 2 4 5

slide-7
SLIDE 7

Examples p

  • Production Planning
  • Production Planning

– given a set of resources that are available in limited amounts – given goods that we want to produce whereby for each good we need a specific amount of each resource resource – 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 profit is maximized!

CS 149 - Intro to CO 25

profit is maximized!

Examples – Production Planning p g

80 80 55 35 30 27 32

CS 149 - Intro to CO 26

Examples – Production Planning p g

  • Constants
  • Constants

– ar: maximum available amount of resource r – crg: how many units of resource r are needed for the d ti f it f d production of one unit of good g – pg: profit per unit of good g produced

  • Variables

Variables

– Xg: How many units of good g shall be produced?

  • Constraints

– Êg Xgcrg≤ ar for all resources r

  • Objective

Maximize Ê p X

CS 149 - Intro to CO 27

– Maximize Êg pg Xg

Examples – Production Planning

X1 + 2 X2 ≤ 80

p g

80 X1 2 X2 80 X1 + X2 ≤ 55 X1 ≤ 35 80 55 35

1

X2 ≤ 30 30 X1 X2 ≤ 27 27 X1 ≤ 32 32 X2

CS 149 - Intro to CO 28

slide-8
SLIDE 8

Examples – Production Planning p g

X1 + 2 X2 ≤ 80 X2 Maximize 5.95 X1 + 8.95 X2 X1 2 X2 80 X1 + X2 ≤ 55 X1 ≤ 35

2

27

1 2

X1 = 30

1

X2 ≤ 30 26 X1 30 X2 = 25 X2 ≤ 27 24 $ X1 ≤ 32 X 22 $

CS 149 - Intro to CO 29

X1 24 26 28 30 32 X1, X2 ¥ 0

Analysis y

  • What did we do?
  • What did we do?

– We modeled our problem with inequalities. – We visualized the feasible region graphically. – We solved our problem by improving the objective until any further improvement of the objective would have yielded to an infeasible solution. y

  • Open questions

– How can we solve problems when there are more th t i bl i l d? than two variables involved? – Could we combine the geometrical view with ideas from our first method to achieve a more generally

CS 149 - Intro to CO 30

g y applicable solution method?

Optimization Problems p

  • Definition
  • Definition

– An Optimization Instance is a pair (P,z) whereby P is a set of n-tuples (the set of feasible solutions) p ( ) and a cost-function z: P  Ñ. A solution x œ P is called optimal if and only if x = argmin z(P). An Optimization Problem is a set of optimization – An Optimization Problem is a set of optimization instances. – An algorithm solves an optimization problem if and g p p

  • nly if it computes an optimal solution for every

instance of the optimization problem or shows that none exists.

CS 149 - Intro to CO 31

none exists.

Optimization Problems - Examples p p

  • Given a weighted undirected graph G let us
  • Given a weighted, undirected graph G, let us

denote with SG the set of all spanning trees in G. Further, denote with zG the function that assigns the corresponding cost to a spanning tree.

  • For all undirected graphs G, (SG,zG) is an
  • ptimization instance
  • ptimization instance.
  • The set { (SG,zG) | G weighted, undirected graph}

is the optimization problem of finding a minimum is the optimization problem of finding a minimum spanning tree in a given graph.

  • Prim’s and Kruskal’s algorithms solve this

CS 149 - Intro to CO 32

Prim s and Kruskal s algorithms solve this

  • ptimization problem.
slide-9
SLIDE 9

The Linear Optimization Problem p

  • Definition
  • Definition

– Assume we are given a matrix A œ Ñ mxn, and vectors b œ Ñ m, and c œ Ñ n. S tti P { Ñ | A b d 0} d – Setting PA,b := { x œ Ñ n | Ax = b and x ¥ 0} and zc(x) := cTx, (PA,b,zc) defines an optimization

  • instance. Such an instance is called an instance of

th Li O ti i ti P bl W th t it h the Linear Optimization Problem. We say that it has Standard Form. – When setting KA,b := { x œ Ñ n | Ax ¥ b and x ¥ 0}

T A,b

and zc(x) := cTx, (KA,b,zc) defines an optimization

  • instance. Such an instance is also called an

instance of the Linear Optimization Problem. We th t it h C i l F

CS 149 - Intro to CO 33

say that it has Canonical Form.

The Standard Form of Li O ti i ti Linear Optimization

  • Lemma

St d d d i l f f li ti i ti – Standard and canonical form of linear optimization are “equivalent”. – Optimization problems for which not all components Optimization problems for which not all components

  • f the solution are required to be non-negative can

be expressed in standard (or canonical) form.

CS 149 - Intro to CO 34

Thank you! Thank you!