CD-ROM MODULE 2 Dynamic Programming TRUE/FALSE M2.1 Dynamic programming can be applied to a professional tennis player’s serving strategy. M2.2 Each item in a knapsack problem will be a stage of the dynamic programming problem. M2.3 For knapsack problems, sn-1 = an sn + bn dn + cn is a typical transformation expression. M2.4 The problem that NASA has in determining what types of cargo may be loaded on the space shuttle is an example of a knapsack problem. M2.5 Both dynamic programming and linear programming take a multi-stage approach to solving problems. M2.6 The second step in solving a dynamic programming problem is to solve the last stage of the problem for all conditions or states. M2.7 Subproblems in a dynamic programming problem are called stages. M2.8 In a shortest-route problem, the nodes represent the destinations. M2.9 In a shortest-route problem, the limit on the number of allowable decision variables from one node to another is the number of possible nodes to which one might yet travel. M2.10 Your local paperperson could make use of the shortest-route technique. *M2.11 Linear programming is typically applied to problems wherein one must make a decision at a specified point (or points) in time. Dynamic programming is typically applied to problems wherein one must make a sequence of decisions. *M2.12 Dynamic programming can only be used to solve network-based problems. *M2.13 In dynamic programming, the decision rules defining an optimal policy give optimal decisions for any entering condition at any stage. *M2.14 In dynamic programming, there is a state variable defined for every stage. *M2.15 A transformation changes the identities of the state variables. 559 Dynamic Programming CD-ROM MODULE 2 MULTIPLE CHOICE M2.16 There are six cities (City 1 City 6) serviced by a particular airline. Limited routes are available, and the distance for each of these routes is presented in the table below. From City 1 1 2 2 3 3 4 5 To City 2 3 4 5 4 5 6 6 Distance (100s miles) 4 2 6 4 4 7 3 2 If dynamic programming were used to solve for the minimum distance from City 1 to City 6, how many stages would there be? (a) (b) (c) (d) (e) 6 5 4 3 2 M2.17 There are three items (A, B, and C) that are to be shipped by air freight. The weights of these are 4, 5, and 3 tons, respectively, and the plane can carry 13 tons. The profits (in thousands of dollars) generated by these are 3 for A, 4 for B, and 2 for C. There are four units of each available for shipment. If this were to be solved as a dynamic programming problem, how many stages would there be? (a) (b) (c) (d) (e) M2.18 1 2 3 4 none of these There are three items (A, B, and C) that are to be shipped by air freight. The weights of these are 4, 5, and 3 tons, respectively. The profits (in thousands of dollars) generated by these are 3 for A, 4 for B, and 2 for C. There are four units of each available for shipment. Only 12 tons may be loaded on the plane. The maximum possible profit for this would be (a) (b) (c) (d) (e) 7. 8. 9. 10. none of these 560 Dynamic Programming CD-ROM MODULE 2 M2.19 There are three items (A, B, and C) that are to be shipped by air freight. The weights of these are 4, 5, and 3 tons, respectively. The profits (in thousands of dollars) generated by these are 6 for A, 7 for B, and 5 for C. A total of 14 tons may be carried by the plane. There are four units of each available for shipment. What is the maximum possible profit for this situation? (a) (b) (c) (d) (e) 14 20 21 22 none of these 561 Dynamic Programming CD-ROM MODULE 2 M2.20 The following information describes a shortest-route problem with the distance in miles. How many stages will this dynamic problem have? From 1 1 1 1 2 2 3 (a) (b) (c) (d) (e) To 2 3 4 5 6 7 6 Distance 40 22 66 39 18 24 23 From 3 4 4 5 6 7 To 7 6 7 7 8 8 Distance 20 43 33 66 72 58 8 4 3 2 1 The data below is a dynamic programming solution for a shortest route problem. Stage 1 s1 6 5 Stage 2 s2 4 3 2 Stage 3 M2.21 s0 7 7 f0 0 0 f1 12 8 d2 46 36 35 26 25 r2 5 4 13 9 4 s1 6 6 5 6 5 f1 12 12 8 12 8 f2 17 16 21 21 12 d3 14 13 12 r3 7 7 10 s2 4 3 2 f2 17 16 12 f3 24 23 22 Using the data in Table M2-1, determine the minimum distance from point 1 to point 7. (a) (b) (c) (d) (e) M2.22 s3 1 Table M2-1 d1 r1 12 67 8 57 21 22 23 24 75 Using the data in Table M2-1, determine the distance of stage 1 for the optimal route. 562 Dynamic Programming CD-ROM MODULE 2 (a) 0 (b) 8 (c) 12 (d) 16 (e) 24 ANSWER: b M2.23 Using the data in Table M2-1, determine the distance of stage 2 for the optimal route. (a) (b) (c) (d) (e) M2.24 Using the data in Table M2-1, determine the distance of stage 3 for the optimal route. (a) (b) (c) (d) (e) M2.25 5 6 7 67 57 Using the data in Table M2-1, determine the optimal arc of stage 2. (a) (b) (c) (d) (e) M2.27 22 23 24 7 10 Using the data in Table M2-1, determine the optimal arc of stage 1. (a) (b) (c) (d) (e) M2.26 0 4 8 12 21 46 36 35 26 25 What is the optimal arc of stage 3? (a) (b) (c) (d) 1 14 13 12 563 Dynamic Programming CD-ROM MODULE 2 (e) none of the above M2.28 What is the optimal travel path from point 1 to 7? (a) (b) (c) (d) (e) M2.29 According to Table M2-2, which gives a solution to a shortest route problem solved with dynamic programming, which cities would be included in the best route? (a) (b) (c) (d) (e) M2.30 5, 7 6, 7 1, 2, 6, 7 1, 2, 5, 7 1, 3, 6, 7 1,2,3,4,5,6 1,4,6,7 1,2,5,6,7 6,7 none of the above According to Table M2-2, which gives a solution to a shortest route problem solved with dynamic programming, the total distance from City 1 to City 7 is 14. What is the shortest distance from City 3 to City 7? (a) (b) (c) (d) (e) 7 10 13 25 none of these 564 Dynamic Programming CD-ROM MODULE 2 M2.31 There are six cities (City 1 City 6) serviced by a particular airline. Limited routes are available, and the distances for each of these routes are presented in the table below. From City 1 1 2 2 3 3 4 5 M2.32 To City 2 3 4 5 4 5 6 6 Distance (100s miles) 4 2 6 4 4 7 3 2 What is the minimum distance that must be traveled to get from City 1 to City 6? (a) 9 (b) 10 (c) 11 (d) 12 (e) none of these M2.33 A stage is a(n) (a) (b) (c) (d) (e) alternative. policy. condition at the end of the problem. subproblem. none of the above 565 Dynamic Programming CD-ROM MODULE 2 M2.34 A transformation describes (a) (b) (c) (d) (e) the relationship between stages. the initial condition of the system. a stage. a state variable. none of the above The following information is to be used for questions M2.35 - M2.38: There are seven cities (City 1 -- City 7) served by Acme Trucking. Route availability is limited. The distances, in hundreds of miles, are given in the table below for each route. From City 1 1 2 2 2 3 M2.35 Distance 5 7 4 6 9 6 From City 3 4 4 5 5 6 To City 5 5 6 6 7 7 Distance 9 8 12 10 15 8 What is the minimum distance a load being moved from City 1 to City 7 must travel? (a) (b) (c) (d) (e) M2.36 To City 2 3 3 4 5 4 3000 miles 2900 miles 1500 miles 2700 miles none of the above What route should the truck from City 1 to City 7 take? (a) (b) (c) (d) (e) 1-2, 2-5, 5-7 1-3, 3-4, 4-6, 6-7 1-2, 2-4, 4-5, 5-6, 6-7 1-3, 3-5, 5-6, 6-7 none of the above 566 Dynamic Programming CD-ROM MODULE 2 M2.37 If the truck was required to take the route from City 4 to City 5, what would be the shortest distance from City 1 to City 7? (a) (b) (c) (d) (e) M2.38 2900 miles 3200 miles 3700 miles 3400 miles none of the above If the truck was required to take the route from City 4 to City 5, what would be the overall route? (a) (b) (c) (d) (e) 1-3, 3-4, 4-5, 5-6, 6-7 1-2, 2-4, 4-5, 5-7 1-2, 2-3, 3-4, 4-5, 5-6, 6-7 1-3, 3-5, 5-6, 6-7 none of the above The following information is to be used for questions M39 – M40: GATRA, the Greater Attleboro-Taunton Regional Transit Authority serves six cities (City 1 City 6). While there are many restrictions (primarily roads on which they may not travel), they do have some choice of routes. The distances between cities, along permitted routes, are presented below. From 1 1 2 2 2 M2.39 To 2 3 3 4 5 Distance 3 4 7 12 28 From 3 3 4 4 5 To 4 5 5 6 6 Distance 8 22 12 15 2 What is the minimum distance that must be traveled to get from City 1 to City 6? (a) (b) (c) (d) (e) 26 9 11 3 none of these 567 Dynamic Programming CD-ROM MODULE 2 M2.40 What is the shortest route? (a) (b) (c) (d) (e) 1-3, 3-5, 5-6 1-2, 2-3, 3-4, 4-5, 5-6 1-3, 3-4, 4-5, 5-6 1-2, 2-3, 3-5, 5-6 none of the above *M2.41 There are four items (A, B, C, and D) that are to be shipped by truck. The weights of these are 3, 7, 4, and 5 tons, respectively, and the plane can carry 13 tons. The profits (in thousands of dollars) generated by these are 3 for A, 4 for B, 2 for C, and 5 for D. There are four units of each available for shipment. If this were to be solved as a dynamic programming problem, how many stages would there be? (a) (b) (c) (d) (e) 1 2 3 4 none of these *M2.42 There are four items (A, B, C, and D) that are to be shipped by truck. The weights of these are 3, 7, 4, and 5 tons, respectively, and the plane can carry 13 tons. The profits (in thousands of dollars) generated by these are 3 for A, 4 for B, 2 for C, and 5 for D. There are three units of each available for shipment. The maximum possible profit for this would be (a) (b) (c) (d) (e) $7 $11 $9 $10 none of these 568 Dynamic Programming CD-ROM MODULE 2 *M2.43 The following information describes a shortest-route problem with the distance in miles. How many stages will this dynamic programming problem have? Table M2-3 From To 1 1 1 2 2 2 3 (a) (b) (c) (d) (e) 2 3 5 4 5 6 5 Distance in miles 40 12 39 17 24 33 20 From To 3 4 4 5 6 7 6 7 6 8 8 8 Distance in miles 49 23 76 27 53 35 8 4 3 2 1 *M2.44 For the shortest route problem described in Table M2-3, what is the distance for the shortest route? (a) (b) (c) (d) (e) 155 miles 66 miles 59 miles 114 miles none of the above *M2.45 For the shortest route problem described in Table M2-3, which arcs comprise the shortest route? (a) (b) (c) (d) (e) 1-2, 2-6, 6-8 1-5, 5-8 1-2, 2-6, 6-8 1-3, 3-5, 5-8 none of the above 569 Dynamic Programming CD-ROM MODULE 2 *M2.46 For the shortest route problem described in Table M2-4, what is the length of the shortest route? (a) 205 miles (b) 94 miles (c) 241 miles (d) 108 miles (e) none of the above *M2.47 For the shortest route problem described in Table M2-4, which arcs comprise the shortest route? (a) (b) (c) (d) (e) 1-2, 2-6, 6-8 1-3, 3-5, 5-8 1-5, 5-8 1-2, 2-4, 4-7, 7-8 none of the above 570 Dynamic Programming CD-ROM MODULE 2 *M2.48 Using the data in Table M2-5, determine the minimum distance from point 1 to point 7. (a) (b) (c) (d) (e) 18 17 23 14 none of the above *M2.49 Using the data in Table M2-5, determine the optimal distance of stage 1. (a) (b) (c) (d) (e) 0 8 7 14 none of the above 571 Dynamic Programming CD-ROM MODULE 2 *M2.50 Using the data in Table M2-5, determine the optimal distance of stage 2. (a) (b) (c) (d) (e) 10 7 8 11 none of the above *M2.51 Using the data in Table M2-5, determine the optimal distance of stage 3. (a) (b) (c) (d) (e) 22 17 24 7 none of the above *M2.52 Using the data in Table M2-5, determine the optimal arc of stage 1. (a) (b) (c) (d) (e) 3 6 47 none of the above *M2.53 Using the data in Table M2-5, determine the optimal arc of stage 2. (a) (b) (c) (d) (e) 46 56 45 25 none of the above *M2.54 Using the data in Table M2-5, determine the optimal arc of stage 4. (a) (b) (c) (d) (e) 1 24 13 34 none of the above *M2.55 Using the data in Table M2-5, determine the optimal travel path from point 1 to 7. (a) 1 (b) 1 (c) 1 572 Dynamic Programming CD-ROM MODULE 2 (d) 1 (e) none of the above Table M2-6 Stage 1 s1 5 2 d1 56 26 r 1 s0 6 6 9 6 f0 0 0 f1 6 9 Stage 2 s2 4 3 d2 45 35 r 2 s1 8 5 3 5 f1 6 9 f2 14 12 Stage 3 s3 1 d3 14 13 12 r 3 s2 7 4 5 3 7 2 f2 14 12 9 f3 21 17 16 *M2.56 According to Table M2-6, which gives a solution to a shortest route problem solved with dynamic programming, which routes would comprise the optimal? (a) (b) (c) (d) 1-3, 3-5, 5-6 1-2, 2-6 1-4, 4-5, 5-6 none of the above *M2.57 According to Table M2-6, which gives a solution to a shortest route problem solved with dynamic programming, the total distance from City 1 to City 6 is 16. What is the shortest distance from City 3 to City 6? (a) (b) (c) (d) (e) 7 14 6 10 none of these 573 Dynamic Programming CD-ROM MODULE 2 *M2.58 According to Table M2-6, which gives a solution to a shortest route problem solved with dynamic programming, which cities are visited along the optimal route? (a) (b) (c) (d) (e) 1, 2, and 6 1, 5, and 6 1, 3, 5, and 6 1, 4, 5, and 6 none of the above *M2.59 What is the minimum distance that must be traveled to get from City 1 to City 6? (a) (b) (c) (d) (e) 900 miles 700 miles 1,100 miles 1,200 miles one of these *M2.60 Which routes should be traveled? (a) (b) (c) (d) (e) 1-2, 2-3, 3-5, 5-6 1-2, 2-3, 3-4, 4-6 1-2, 2-5, 5-6 1-4, 4-6 none of the above 574 Dynamic Programming CD-ROM MODULE 2 PROBLEMS M2.61 Develop the shortest-route network for the problem below, and determine the minimum distance from node 1 to node 6. From 1 1 2 2 3 3 4 5 M2.62 Distance 4 3 6 7 4 5 6 4 Develop the shortest-route network for the problem below, and determine the minimum distance from node 1 to node 7. From 1 1 2 2 3 3 3 4 5 6 M2.63 To 2 3 4 5 4 5 6 6 To 2 3 4 5 4 5 6 7 7 7 Distance 4 2 6 4 4 7 6 3 5 4 There are four items (A, B, C, and D) that are to be shipped by air freight. The weights of these are 3, 4, 5, and 3 tons, respectively. The profits (in thousands of dollars) generated by these are 5 for A, 6 for B, 7 for C, and 6 for D. There are 2 units of A, 1 unit of B, 3 units of C, and 2 units of D available to be shipped. The maximum weight is 16 tons. Use dynamic programming to determine the maximum possible profits that may be generated. 575 Dynamic Programming CD-ROM MODULE 2 M2.64 M2.65 The data below details the distances that a delivery service must travel. Use dynamic programming to solve for the shortest route from City 1 to City 8. From To 1 1 1 2 2 3 3 2 3 4 5 6 5 6 Distance (miles) 18 14 16 9 8 7 6 From To 4 4 4 5 6 7 5 6 7 8 8 8 Distance (miles) 8 6 5 17 16 20 Hard D. Head has decided that he wants to climb one of the world's tallest mountains. He has mapped out a number of routes between various points on the mountain, and rated each route as to difficulty. His rating scale considers a 1 as being particularly easy, and a 10 as being almost impossible. (a) Given the information below, identify the route that would provide the easiest climb. (b) What would be the average rating of the route? (c) What is wrong with this approach to Mr. Head's problem? From Point 1 1 2 3 3 4 4 4 5 To Point 2 3 3 4 5 5 6 8 6 Rating From Point 5 5 5 6 6 7 7 8 3 4 6 2 6 4 7 8 4 576 To Point 7 8 9 7 8 8 9 9 Rating 5 8 10 7 7 5 6 9 Dynamic Programming CD-ROM MODULE 2 SHORT ANSWER/FILL IN THE BLANK M2.66 In a shortest-route problem, write a typical transformation expression. M2.67 What is meant by a decision variable in a shortest-route problem? M2.68 What is the decision criterion for a shortest route problem? M2.69 What is the decision criterion for a knapsack problem? M2.70 What are the four steps in dynamic programming? M2.71 What are the four elements defining each stage in a dynamic programming problem? M2.72 Identify two types of problems that can be solved by dynamic programming. M2.73 Discuss, briefly, the role of the transformation function. M2.74 Discuss, briefly, the difference between a decision variable and a state variable. M2.75 In the shortest-route problem, circles represent ________, and arrows represent ______. MATCHING M2.76 Stage (a) Relationship between stages M2.77 Transformation (b) Subproblem M2.78 Decision variable (c) Conditions of a stage M2.79 Decision criterion (d) Alternatives M2.80 State variable (e) Objective 577 Dynamic Programming CD-ROM MODULE 2 578