Vertex visited distance previous a f ø b f ø c f ø

Info icon This preview shows pages 32–45. Sign up to view the full content.

Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F Ø F F Ø G F Ø H F Ø I F Ø J F Ø K F 0 Ø L F Ø
Image of page 32

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

Example We visit vertex K Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F Ø F F Ø G F Ø H F Ø I F Ø J F Ø K T 0 Ø L F Ø
Image of page 33
Example Vertex K has four neighbors: H, I, J and L Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F Ø F F Ø G F Ø H F Ø I F Ø J F Ø K T 0 Ø L F Ø
Image of page 34

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

Example We have now found at least one path to each of these vertices Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F Ø F F Ø G F Ø H F 8 K I F 12 K J F 17 K K T 0 Ø L F 16 K
Image of page 35
Example We’re finished with vertex K To which vertex are we now guaranteed we have the shortest path? Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F Ø F F Ø G F Ø H F 8 K I F 12 K J F 17 K K T 0 Ø L F 16 K
Image of page 36

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

Example We visit vertex H: the shortest path is (K, H) of length 8 Vertex H has four unvisited neighbors: E, G, I, L Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F Ø F F Ø G F Ø H T 8 K I F 12 K J F 17 K K T 0 Ø L F 16 K
Image of page 37
Example Consider these paths: (K, H, E) of length 8 + 6 = 14 (K, H, G) of length 8 + 11 = 19 (K, H, I) of length 8 + 2 = 10 (K, H, L) of length 8 + 9 = 17 Which of these are shorter than any known path? Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F Ø F F Ø G F Ø H T 8 K I F 12 K J F 17 K K T 0 Ø L F 16 K
Image of page 38

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

Example We already have a shorter path (K, L), but we update the other three Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F 14 H F F Ø G F 19 H H T 8 K I F 10 H J F 17 K K T 0 Ø L F 16 K
Image of page 39
Example We are finished with vertex H Which vertex do we visit next? Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F 14 H F F Ø G F 19 H H T 8 K I F 10 H J F 17 K K T 0 Ø L F 16 K
Image of page 40

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

Example The path (K, H, I) is the shortest path from K to I of length 10 Vertex I has two unvisited neighbors: G and J Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F 14 H F F Ø G F 19 H H T 8 K I T 10 H J F 17 K K T 0 Ø L F 16 K
Image of page 41
Example Consider these paths: (K, H, I, G) of length 10 + 3 = 13 (K, H, I, J) of length 10 + 18 = 28 Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F 14 H F F Ø G F 19 H H T 8 K I T 10 H J F 17 K K T 0 Ø L F 16 K
Image of page 42

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

Example We have discovered a shorter path to vertex G, but (K, J) is still the shortest known path to vertex J Vertex Visited Distance Previous A F Ø B F Ø C F Ø D F Ø E F 14 H F F Ø G F 13 I H T 8 K I T 10 H J F 17 K K T 0 Ø L F 16 K
Image of page 43
Example Which vertex can we visit next?
Image of page 44

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

Image of page 45
This is the end of the preview. Sign up to access the rest of the 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