{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW1_solution - f 6 = max t 69,t 68 f 8 = max(15 7 10 = 17 f...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
solution of homework 1 Problem 1 Let f i be the distance of the longest path from Node i to Node 9. According to optimality equation, We could have f i = max j ( t ij + f j ) And the boundary condition is f (9) = 0. For the graph given in class: f 7 = 3 f 8 = 10 f 6 = max( t 69 , t 68 + f 8 ) = max(15 , 7 + 10) = 17 f 5 = t 57 + f 7 = 7 + 3 = 10 f 4 = max( t 45 + f 5 , t 47 + f 7 , t 48 + f 8 ) = max(4 + 10 , 15 + 3 , 7 + 10) = 18 f 3 = max( t 34 + f 4 , t 36 + f 6 ) = max(3 + 18 , 4 + 17) = 21 f 2 = max( t 25 + f 5 , t 24 + f 4 ) = max(12 + 10 , 6 + 18) = 24 f 1 = max( t 12 + f 2 , t 13 + f 3 ) = max(7 + 24 , 2 + 21) = 31 So the longest path from Node 1 to Node 9 is 1 2 4 7 9 And the distance of the longest path is 31 1
Image of page 1

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

View Full Document Right Arrow Icon
For the graph in the textbook: f 7 = 3 f 8 = 10 f
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f 6 = max( t 69 ,t 68 + f 8 ) = max(15 , 7 + 10) = 17 f 5 = t 57 + f 7 = 7 + 3 = 10 f 4 = max( t 45 + f 5 ,t 47 + f 7 ,t 48 + f 8 ,t 46 + f 6 ) = max(4 + 10 , 15 + 3 , 7 + 10 , 3 + 17) = 20 f 3 = max( t 34 + f 4 ,t 36 + f 6 ) = max(3 + 20 , 4 + 17) = 23 f 2 = max( t 25 + f 5 ,t 24 + f 4 ) = max(12 + 10 , 6 + 20) = 26 f 1 = max( t 12 + f 2 ,t 13 + f 3 ) = max(1 + 26 , 2 + 23) = 27 So the longest path from Node 1 to Node 9 is 1 → 2 → 4 → 6 → 8 → 9 And the distance of the longest path is 27 2...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern