s02lec14b

# s02lec14b - 15.053 A 2-Variable Integer program Thursday,...

This preview shows pages 1–4. Sign up to view the full content.

1 15.053 Thursday, April 4 z Introduction to Integer Programming Integer programming models Handouts: Lecture Notes 2 A 2-Variable Integer program maximize 3x + 4y subject to 5x + 8y 24 x, y 0 and integer z What is the optimal solution? The Feasible Region 0 1 2 3 4 5 0 1 2 3 4 5 Solve LP (ignore integrality) get x=24/5, y=0 and z =14 2/5. Round, get x=5, y=0, infeasible! Truncate, get x=4, y=0, and z =12 Same solution value at x=0, y=3. Optimal is x=3, y=1, and z =13 4 Why integer programs? z Advantages of restricting variables to take on integer values More realistic More flexibility z Disadvantages More difficult to model Can be much more difficult to solve 5 On 0-1 variables z Integer programs: linear equalities and inequalities plus constraints that say a variable must be integer valued. z We also permit “x j {0,1}.” This is equivalent to 0 x j 1 and x j integer. 6 The mystery of integer programming z Some integer programs are easy (we can solve problems with millions of variables) z Some integer programs are hard (even 100 variables can be challenging) z It takes expertise and experience to know which is which z It’s an active area of research at MIT and elsewhere

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
7 The game of fiver. Click on a circle, and flip its color and that of adjacent colors. Can you make all of the circles red? 8 The game of fiver. 9 The game of fiver. 10 The game of fiver. Let’s write an optimization problem whose solution solves the problem in the fewest moves. 11 Optimizing the game of fiver. 1 2 3 4 5 1 2 3 4 5 Let x(i,j) = 1 if I click on the square in row i and column j. x(i,j) = 0 otherwise. Focus on the element in row 3, and column 2. To turn it red, we require that x(2,2) + x(3,1) + x(3,2) + x(3,3) + x(4,2) is odd 12 Optimizing the game of fiver z (i, j) to be red for i = 1 to 5 and for j = 1 to 5 z We want to minimize the number of moves. Minimize Σ i,j=1 to 5 x(i,j) Subject to x(i, j) + x(i, j-1) + x(i, j+1) + x(i-1, j) + x(i+1, j) is odd for i = 1 to 5, j = 1 to 5 x(i, j) is 0 or 1 for i = 1 to 5 and j = 1 to 5 x(i, j) = 0 otherwise. z This (with a little modification) is an integer program.
13 Optimizing the game of fiver z (i, j) to be red for i = 1 to 5 and for j = 1 to 5 z We want to minimize the number of moves.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## s02lec14b - 15.053 A 2-Variable Integer program Thursday,...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online