Upload
verity-richard
View
228
Download
0
Embed Size (px)
Citation preview
1
ENM 503 Block 3Lesson 12 – Discrete Optimization Models
Combinatorial Problems and their Solutions
An Introduction to Discrete Optimization
Narrator: Charles EbelingUniversity of Dayton
2
The Lineup
The Assignment Problem The Knapsack Problem The Traveling Salesman Problem The Postman problem
3
Combinatorial Optimization Problems
Optimization problem having a finite number of discrete solutions.
One solution approach is to explicitly generate and evaluate all possible solutions
Explicit enumeration
Consider a problem with 100 variables where xj = 0, 1, 2, …, 50; j = 1,2, …, 100
number of possible solutions = 51100
Explicit enumeration may not be possible Implicit enumeration – attempt to account for all
possible solution without enumerating all of them Problem dependent
4
The Assignment Problem
Assign n workers to n tasksA Problem in Permutations
I heard that this is really good!
5
A problem
Three workers are to be assigned to one of 4 distinct tasks. Each worker can perform each task in a different time. The objective is to minimize the total time to complete the assigned tasks.
worker task times
We need to add a dummy worker.
time task1 task2 task3 task4w1 12 13 10 11w2 10 12 14 10w3 14 11 15 12
Complete Enumeration
6
time task1 task2 task3 task4w1 12 13 10 11w2 10 12 14 10w3 14 11 15 12
(4)(3)(2) = 24 possible solutions
w1 w2 w3 time w1 w2 w3 time
1 task1 task2 task3 35 13 task1 task4 task3 37
2 task1 task3 task2 37 14 task1 task3 task4 38
3 task2 task1 task3 38 15 task4 task1 task3 36
4 task2 task3 task1 41 16 task4 task3 task1 39
5 task3 task1 task2 31 17 task3 task1 task4 32
6 task3 task2 task1 36 18 task3 task4 task1 34
7 task4 task2 task3 38 19 task1 task2 task4 36
8 task4 task3 task2 36 20 task1 task4 task2 33
9 task2 task4 task3 38 21 task2 task1 task4 35
10 task2 task3 task4 39 22 task2 task4 task1 37
11 task3 task4 task2 35 23 task4 task1 task2 32
12 task3 task2 task4 34 24 task4 task2 task1 37
A Bigger Problem
What if there were 20 workers and 25 tasks to be completed?
25P20
= 29,260,083,694,425,000,000,000 What if it takes 1 second to evaluate
each assignment? 29,260,083,694,425,000,000,000 sec/ (60 sec/min X 60 min/hr x 24 hr/day x 365
days/yr = 4,098,810,365,754,210 years
7
8
Some Applications
workers to tasks jobs to machines facilities to locations Truck drivers to customer pick-up points Umpire crews to baseball games Judges to court dockets State inspectors to construction sites Weapons to targets
These are some terrific applications.
The Knapsack Problem
A total of m items whose weights are w1, w2, …, wm are available for packing a knapsack. The total weight to be packed cannot exceed Wtotal. The objective is to pack as many items as possible. 9
The Knapsack Problem - a binary problem
10
m
ii=1
1
0 if itemi is not to be packedLet
1 if itemi is to be packed
Maximize
subject to:
i
m
i i totali
x
p x
w x W
New & Improved Knapsack Problem
11
1
1
max
subject to:
n
i ii
n
i ii
p v x
w x Weight
It is comforting to
know my load is
optimal!
A thief robbing a store can carry a maximum weight of w. There are n items and ith item weighs wi and is worth vi dollars. What items should thief take?
A Knapsack Problem to Solve
Johnny has five friends who would like to go on a fishing trip with him to the remote island of Chichagof located 70 miles northwest of Sitka, Alaska.
However, Johnny can only carry an additional 319 pounds of weight in his seaplane – his only means of transportation.
Johnny has assigned a “pleasure” index to each friend – the larger the value the more Johnny would enjoy the friend’s company.
Which friend(s) should Johnny take with him?
12
The Data
13
Friend Jane Joan Judy Joy Jim
Pleasure Index 8 6 9 10 3
Weight (lb.) 130 180 140 125 185
25 = 32 alternatives
TheResults
14
Friend Jane Joan Judy Joy Jim Pleasure Index 8 6 9 10 3 Weight (lb.) 130 180 140 125 185 value weight 1 1 1 1 1 36 760 1 1 1 1 1 0 33 575 2 1 1 1 0 1 26 635 3 1 1 0 1 1 27 620 4 1 0 1 1 1 30 580 5 0 1 1 1 1 28 630 6 1 1 1 0 0 23 450 7 1 1 0 0 1 17 495 8 1 0 0 1 1 21 440 9 0 0 1 1 1 22 450 10 1 1 0 1 0 24 435 11 1 0 1 0 1 20 455 12 0 1 0 1 1 19 490 13 0 1 1 1 0 25 445 14 0 1 1 0 1 18 505 15 1 0 1 1 0 27 395 16
feasible 1 1 0 0 0 14 310 17feasible 1 0 0 0 1 11 315 18feasible 0 0 0 1 1 13 310 19feasible 1 0 1 0 0 17 270 20
0 1 0 0 1 9 365 21feasible 0 1 0 1 0 16 305 22
0 1 1 0 0 15 320 23feasible 0 0 1 1 0 19 265 24feasible 1 0 0 1 0 18 255 25
0 0 1 0 1 12 325 26feasible 1 0 0 0 0 8 130 27feasible 0 1 0 0 0 6 180 28feasible 0 0 1 0 0 9 140 29feasible 0 0 0 1 0 10 125 30feasible 0 0 0 0 1 3 185 31feasible 0 0 0 0 0 0 0 32
319 lb.
15
Let’s count the number of solutions…
Dad, how many solutions are there for the knapsack problem if I have 30 items
to consider?
You should know that Johnny. It is 230 or
1,073,741,824 solutions if you include the infeasible
ones as well.
Other Binary Selection Problems
Menu selection Select items from a menu to maximize protein Calorie and carbohydrate or cost constraints
Cargo loading on trucks or aircraft Which crates or pallets to load – maximize value Volume and weight constraints
Project selection – n potential engineering projects to fund
Maximize expected profit Cost or resource constraint
16
17
The Traveling Salesman Problem
There once was a farmer’s daughter…
You got to know the territory!
18
Traveling Salesman Problem
A salesman must visit each of n cities once and only once returning to his starting city. What route should be followed so that the total distance (cost or time) traveled is minimized?
(n-1)! possible routes
ItineraryDaytonCincinnatiDenverNew YorkAtlantaChicagoBostonSan FranciscoWapakoneta
My secretary always finds for
me, the minimum
distance itinerary.
19
A From-to MatrixFrom / To
City A
City B
City C
City D
City A
25 30 12
City B
25 17 23
City C
30 17 37
City D
12 23 37distances in miles
20
Traveling on a network
2
5
5
3 4
6
7
8
11A
BC
D
E
F
G
6! = 720 routesA solution isa permutation!
21
A Traveling Salesman Problem
P. Rose, currently unemployed, has hit upon the followingscheme for making some money. He will guide a group ofpeople on a tour of all National League baseball parks. Thetour will start and end in Cincinnati. What route should hefollow in order to minimize total distances (costs)?
22
Distances between parks in miles
ATL CHI CIN HOU LA MON NY PHI PIT STL SD SFATL 702 454 842 2396 1196 864 772 714 554 2363 2679CHI 702 324 1093 2136 764 845 764 459 294 2184 2187CIN 454 324 1137 2180 798 664 572 284 338 2228 2463HOU 842 1093 1137 1616 1857 1706 1614 1421 799 1521 2021LA 2396 2136 2180 1616 2900 2844 2752 2464 1842 95 405MON 1196 764 798 1857 2900 396 424 514 1058 2948 2951NYK 864 845 664 1706 2844 396 92 386 1002 2892 3032 PHI 772 764 572 1614 2752 424 92 305 910 2800 2951PIT 714 459 284 1421 2464 514 386 305 622 2512 2646STL 554 294 338 799 1842 1058 1002 910 622 1890 2125SD 2363 2184 2228 1521 95 2948 2892 2800 2512 1890 500SF 2679 2187 2463 2021 405 2951 3032 2951 2646 2125 500
11! = 39,916,800 alternatives
23
A Heuristics AlgorithmI need a goodheuristic tosolve this problem.
Joe EngineerP. Rose
Heuristic: A procedure for solving problems by an intuitiveapproach in which the structure of the problem can be interpretedand exploited intelligently to obtain a reasonable solution.
24
Nearest Neighbor Heuristic – a greedy heuristic algorithm
ATL CHI CIN HOU LA MON NY PHI PIT STL SD SFATL 702 454 842 2396 1196 864 772 714 554 2363 2679CHI 702 324 1093 2136 764 845 764 459 294 2184 2187CIN 454 324 1137 2180 798 664 572 284 338 2228 2463HOU 842 1093 1137 1616 1857 1706 1614 1421 799 1521 2021LA 2396 2136 2180 1616 2900 2844 2752 2464 1842 95 405MON 1196 764 798 1857 2900 396 424 514 1058 2948 2951NYK 864 845 664 1706 2844 396 92 386 1002 2892 3032 PHI 772 764 572 1614 2752 424 92 305 910 2800 2951PIT 714 459 284 1421 2464 514 386 305 622 2512 2646STL 554 294 338 799 1842 1058 1002 910 622 1890 2125SD 2363 2184 2228 1521 95 2948 2892 2800 2512 1890 500SF 2679 2187 2463 2021 405 2951 3032 2951 2646 2125 500
25
LAX
SNF
CIN
MON
SND
ATL
HOU
CHI PITSTL
PHI
NYK
DISTANCE = 8015 MILES
26
LAX
SNF
CIN
MON
SND
ATL
HOU
CHI PITSTL
PHI
NYK
DISTANCE = 8015 MILES
X
X
OPTIMUM= 7577 MILES
27
Other Applications
manufacture of circuit boards assembly line reconfiguration mixing paints colors in vats searching for stars
28
The Chinese Postman Problem
A study in the optimal delivery of the postal mail
29
The problem defined The Chinese postman problem concerns
a postman who has to deliver mail to houses along each of the streets in a particular housing district and wants to minimize the distance that has to be walked.
The problem was first considered by the Chinese mathematician Mei-ko Kwan in the 1960s.
30
More of the Chinese Postman Problem
Given a network with distances assigned to each arc,find the minimum distance walk that walks each arcat least once and returns to the starting node.
2
5
5
3 4
6
7
8
11A
BC
D
E
F
G
I get tired walking
this route. It is too
long.
Solve by Trial and Error
31
A – B – C – D – F – G – E – D –E –B –E – G – A - 67 miles
Start and end At AMinimum possible distance = 51 miles
2
5
5
3 4
6
7
8
11A
BC
D
E
F
G
A – B – C – D – F – G – E – D – E – B – A – G – A - 63 miles
What if I need to walk every street once in each direction?
32
The Postman Problem Model
Given a network with distances assigned to each arc, find the minimum distance walk that walks each arc at least once and returns to the starting node.
1
1 1
1 1
,
min
1 or 1 1
1,2,3,...
ij
n n
ij ijj i
i j
ij ji ij ji
n n
ik kji ji j j i
let x nbr times arc i j walked
z d x
st
x x x and x
x x for k n
33
Other Applications
trash pickup newspaper delivery and door-to-door
soliciting railroad track inspections and maintenance snow plowing, salting streets, and street
cleaning meter reading school bus routes
34
Play ball! Now it’s your turn.
Engineering Management & Systems has proudly presented
Discrete SystemsMethods and Models