HW9_solution

# HW9_solution - IEOR 4004 HW#9 solution 1 P 418#1 Find the...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: IEOR 4004 HW #9 solution 1. P 418 #1 Find the shortest path from node 1 to node 6 in Fig. below: 1 0* 0* From 6 31 24 = 7 6 > 5 31 19 = 12 6 > 4 31 12 = 19 31 7 = 24 31 0 = 31 From 5 24 19 = 5 24 12 = 12 5 > 3 24 7 = 17 24 0 = 24 From 4 19 12 = 7 4 > 3 19 7 = 12 4 > 2 19 0 = 19 2 7 7* 7* 3 12 14 12* 12* 4 21 19 19 19* 19* 5 31 28 24 26 24* 24* 6 44 38 33 31 31 31* 31* From 3 From 2 12 7 = 5 7 0 = 7 2 > 1 12 0 = 12 3 > 1 Shortest Paths: 1 2 4 6 / 1 3 4 6 / 1 3 5 6, with length equal to 31. 2. P 418 #2 Find the shortest path from node 1 to node 5 in Fig. below: 1 0* 0* 2 2 2* 2* 3 8 7 7* 7* 4 Inf 6 6* 13 6* 5 Inf 14 16 Inf 14* 14* From 5: From 2: 14 6 = 8 2 0 = 2 2 > 1 14 2 = 12 5 >2 Shortest Path: 1 2 5, with length equal 14. 3. P 418 #4 Use Dijkstra's algorithm to find the shortest path from node 1 to node 4 in Fig. below. Why does Dijkstra's algorithm fail to obtain the correct answer? 1 0* 0* From 4: 2 1 = 1 4 >3 2 2 = 0 Shortest Path according to Dijkstra's: 1 3 4 From 2: 2 0 = 2 3 > 1 2 2 2* 2* 3 1 1* 1* 4 2 2* 2* Obviously, Dijkstra's algorithm fails to give the actual shortest path, which is 1 2 3 4, since it makes the assumption that all arc lengths are nonnegative. In this case, the arc length of (2,3) is 2, thus making the Dijkstra's algorithm fails. 4. P419 #7 Minimize the total cost of having a machine for five years. Total cost = purchase cost + maintain cost Let node i = the beginning of year i Cij = the total cost of purchasing and maintaining a machine from beginning of year I to the beginning of year j, where i < j, C12 = 170 + 38 = 208 C34 = 210 + 38 = 248 C23 = 190 + 38 = 228 C13 = C12 + 50 = 258 C35 = C34 + 50 = 298 C24 = C23 + 50 = 278 C25 = C24 + 97 = 375 C14 = C13 + 97 = 355 C36 = C35 + 97 = 395 C26 = C25 + 182 = 557 C15 = C14 + 182 = 537 C16 = C16 + 304 = 841 C56 = 300 + 38 = 338 C45 = 250 + 38 = 288 C46 = C45 + 50 = 338 6 841 765 653 693 875 653* 653* 1 2 3 4 5 0* 208 258 355 537 208* 436 486 583 258* 506 556 355* 543 537* 0* 208* 258* 355* 537* From 6: From 3: 653 537 = 116 258 208= 50 653 355 = 298 258 0 = 258 3 > 1 653 258 = 395 6 > 3 653 208 = 445 653 0 = 653 Shortest Path: 1 3 6, with length equal to 653 Therefore, a new machine should be purchased at year 1 and year 3. ...
View Full Document

## This note was uploaded on 02/10/2010 for the course IEOR 3600 taught by Professor Chudnovsky during the Spring '09 term at Columbia.

Ask a homework question - tutors are online