{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

346Chapter18HWSolutions

# 346Chapter18HWSolutions - Chapter 18 Dynamic Programming...

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

Chapter 18 Dynamic Programming Learning Objectives 1. Understand the basics of dynamic programming and its approach to problem solving. 2. Learn the general dynamic programming notation. 3. Be able to use the dynamic programming approach to solve problems such as the shortest route problem, the knapsack problem and production and inventory control problems. 4. Understand the following terms: stages state variables principle of optimality stage transformation function return function knapsack problem 18 - 1

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

View Full Document
Chapter 18 Solutions: 1. Route Value Route Value (1-2-5-8-10) 22 (1-3-6-8-10) 26 (1-2-5-9-10) 25 (1-3-6-9-10) 22 (1-2-6-8-10) 24 (1-3-7-8-10) 22 (1-2-6-9-10) 20 (1-3-7-9-10) 21 (1-2-7-8-10) 25 (1-4-5-8-10) 22 (1-2-7-9-10) 24 (1-4-5-9-10) 25 (1-3-5-8-10) 19 (1-4-6-8-10) 27 (1-3-5-9-10) 22 (1-4-6-9-10) 23 The route (1-3-5-8-10) has the smallest value and is thus the solution to the problem. The dynamic programming approach results in fewer computations because all 16 paths from node 1 to node 10 need not be computed. For example, at node 1 we considered only 3 paths: the one from 1-2 plus the shortest path from node 2 to node 10, the one from 1-3 plus the shortest path from node 3 to node 10, and the one from 1-4 plus the shortest path from node 4 to node 10. 2. a. The numbers in the squares above each node represent the shortest route from that node to node 10. 1 2 3 4 6 5 9 8 7 10 26 19 10 18 21 11 17 6 8 10 8 5 4 6 8 7 7 9 10 5 11 6 10 8 The shortest route is given by the sequence of nodes (1-4-6-9-10). b. The shortest route from node 4 to node 10 is given by (4-6-9-10). c. Route Value Route Value (1-2-5-7-10) 32 (1-3-6-8-10) 34 (1-2-5-8-10) 36 (1-3-6-9-10) 31 (1-2-5-9-10) 28 (1-4-6-8-10) 29 (1-3-5-7-10) 31 (1-4-6-9-10) 26 (1-3-5-8-10) 35 (1-3-5-9-10) 27 See 1 above for an explanation of how the computations are reduced. 18 - 2
Dynamic Programming 3. Use 4 stages; one for each type of cargo. Let the state variable represent the amount of cargo space remaining. a. In hundreds of pounds we have up to 20 units of capacity available. Stage 1 (Cargo Type 1)

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.

{[ snackBarMessage ]}

### Page1 / 12

346Chapter18HWSolutions - Chapter 18 Dynamic Programming...

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

View Full Document
Ask a homework question - tutors are online