Академический Документы
Профессиональный Документы
Культура Документы
1
Quotes of the Day
Somebody who thinks logically is a nice
contrast to the real world.
-- The Law of Thumb
2
Combinatorial optimization problems
INPUT: A description of the data for an instance of the
problem
3
Example 1: Traveling Salesman Problem
4
Example 2: Balanced Partition
The best split is {10, 13, 22} and {7, 17, 20}.
5
Example 3. Exam Scheduling
6
Example 4: Maximum Clique Problem
7
Example 5: Integer programming
Example: maximize 3x + 4y
subject to 5x + 8y 24
x, y 0 and integer
8
Which of the following is false?
9
The advantages of integer programs
Binary variables
10
Examples of constraints
11
Nonlinear functions can be modeled using
integer programming f(x)
7
y x
0 2 4
y = 2x if 0 x 3
y = 9x if 3 x 7
y = -5 + x if 7 x 9
x
0 3 7 9 12
No. Thats not what we mean! We
You mean, that mean that we can take any of these
you can write constraints, and there is a way of
all of those creating integer programming
constraints in constraints that are mathematically
an integer equivalent. Its not so easy at first,
program. but it gets easier after you see some
Thats so easy. examples.
13
Integer Programs
14
Types of Integer Programs
Mixed integer linear
programs xj 0 and integer for some or all j.
(MILPs or MIPs)
0-1 Integer
xj {0,1} for every j.
Programs
maximize 3x + 4y
subject to 5x + 8y 24
x, y 0 and integer
17
The Feasible Region
solution?
3
0 1 2 3 4 5
A rounding technique that sometimes
is useful, and sometimes not.
Solve LP (ignore
integrality) get x=24/5,
5
0 1 2 3 4 5
Consider the feasible regions for the
two integer programs on this slide.
5
5
4
4
3
3
2
2
1
1
0
0
0 1 2 3 4 5
0 1 2 3 4 5
max 3x + 4y
max 3x + 4y
s.t. 5x + 8y 24
s.t. x + y 4
x, y 0 and integer
2x + 3y 9
x, y 0 and integer 20
Which of the following is false for the two
integer programs on the previous slide?
1. The two models are the same in that they
have the same feasible regions and the
same objective function.
2. Model
1 will be solved faster because it
has fewer constraints.
3. If we removed the integrality constraints
from both models, they would become
two different linear programs.
4. Model 1 has the fewest number of
constraints for an IP with this feasible
region.
21
Why integer programs?
Disadvantages
More difficult to model
Can be much more difficult to solve
22
On computation for IPs
23
Running time to optimality (CPLEX)
1,000,000
< 1 Hour > 1 hour Not yet solved
number of columns
100,000
10,000
25
On formulating integer programs
27
The Game of Fiver.
28
The game of fiver.
Click on (3, 3)
29
The game of fiver.
Click on (3, 1)
Click on (4, 4)
30
The game of fiver.
Next: an
optimization
problem whose
solution solves
the problem in
the fewest
moves.
31
On forming Integer programs
32
Optimizing the game of fiver.
33
Lets write the formulation
34
Optimizing the game of fiver
35
Optimizing the game of fiver
37
Trading for Profit
Nooz is a contestant on Trading for Profits. Its main
slogan is
I Trading for Profit
Nooz has just won 14 IHTFP points. We now join the
quiz show to see what the 14 points are worth.
38
iPad Data server MIT Brass Rat
ring
5 points 7 points 4 points
39
MIT Brass Rat $500 gift
iPad Data server certificate to
ring
Au Bon Pain
5 points 7 points 4 points 3 points
16 utils 22 utils 12 utils 8 utils
Points 5 7 4 3 4 6
Utility 16 22 12 8 11 19
1 if prize i is selected
Let x i
0 otherwise
41
Integer Programming Formulation
42
Knapsack or Capital Budgeting
43
The mystery of integer programming
44
Using Excel Solver to Solve Integer
Programs
Add the integrality constraints (or add that a variable is
binary)
Set the Solver Tolerance. (Integer optimality %)
(The tolerance is the percentage deviation from optimality
allowed by solver in solving Integer Programs.)
The default used to be 5%.
A 5% default is way too high
It often finds the optimum for small problems
45
Some Comments on IP models
46
Summary on Integer Programming
Dramatically improves the modeling capability
Economic indivisibilities
Logical constraints
capital budgeting
games
Not as easy to model
Not as easy to solve.
Next lecture: more IP formulations
47
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.