1 ENM 503 Block 3 Lesson 12 – Discrete Optimization Models Combinatorial Problems and their Solutions An Introduction to Discrete Optimization Narrator: Charles Ebeling University 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 x j = 0, 1, 2, …, 50; j = 1,2, …, 100 number of possible solutions = 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 tasks A 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. timetask1task2task3task4 w w w
Complete Enumeration 6 timetask1task2task3task4 w w w (4)(3)(2) = 24 possible solutions w1w2w3time w1w2w3time 1task1task2task33513task1task4task337 2task1task3task23714task1task3task438 3task2task1task33815task4task1task336 4task2task3task14116task4task3task139 5task3task1task23117task3task1task432 6task3task2task13618task3task4task134 7task4task2task33819task1task2task436 8task4task3task23620task1task4task233 9task2task4task33821task2task1task435 10task2task3task43922task2task4task137 11task3task4task23523task4task1task232 12task3task2task43424task4task2task137
A Bigger Problem What if there were 20 workers and 25 tasks to be completed? 25 P 20 = 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 w 1, w 2, …, w m are available for packing a knapsack. The total weight to be packed cannot exceed W total. The objective is to pack as many items as possible. 9
The Knapsack Problem - a binary problem 10
New & Improved Knapsack Problem 11 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 i th item weighs w i and is worth v i 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 FriendJaneJoanJudyJoyJim Pleasure Index Weight (lb.) = 32 alternatives
The Results 14 FriendJaneJoanJudyJoyJim Pleasure Index Weight (lb.) valueweight feasible feasible feasible feasible feasible feasible feasible feasible feasible feasible feasible feasible feasible 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 2 30 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 Itinerary Dayton Cincinnati Denver New York Atlanta Chicago Boston San Francisco Wapakoneta My secretary always finds for me, the minimum distance itinerary.
19 A From-to Matrix From / To City ACity BCity CCity D City A City B City C City D distances in miles
20 Traveling on a network A B C D E F G 6! = 720 routes A solution is a permutation!
21 A Traveling Salesman Problem P. Rose, currently unemployed, has hit upon the following scheme for making some money. He will guide a group of people on a tour of all National League baseball parks. The tour will start and end in Cincinnati. What route should he follow in order to minimize total distances (costs)?
22 Distances between parks in miles ATL CHI CIN HOU LA MON NY PHI PIT STL SD SF ATL CHI CIN HOU LA MON NYK PHI PIT STL SD SF ! = 39,916,800 alternatives
23 A Heuristics Algorithm I need a good heuristic to solve this problem. Joe EngineerP. Rose Heuristic: A procedure for solving problems by an intuitive approach in which the structure of the problem can be interpreted and 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 SF ATL CHI CIN HOU LA MON NYK PHI PIT STL SD SF
25 LAXSNFCIN MON SNDATLHOUCHIPITSTLPHINYK DISTANCE = 8015 MILES
26 LAXSNFCIN MON SNDATLHOUCHIPITSTLPHINYK 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 arc at least once and returns to the starting node A B C 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 A Minimum possible distance = 51 miles A B C 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.
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 Systems Methods and Models