Lecture9 - Graphs and Network Flows ISE 411 Lecture 9 Dr...

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

Graphs and Network Flows ISE 411 Lecture 9 Dr. Ted Ralphs
Image of page 1

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

ISE 411 Lecture 9 1 References for Today’s Lecture Required reading Section 21.2 References AMO Sections 4.5–4.7 CLRS Section 24.3
Image of page 2
ISE 411 Lecture 9 2 Solving SPP with Non-Negative Arc Lengths When there are cycles, the situation is a bit more complex. Dijkstra’s Algorithm generalizes the algorithm from Lecture 7 for the acyclic case. The difference is the order in which the nodes are examined. As before, nodes are divided into two groups temporarily labeled permanently labeled In order to produce the shortest paths tree, we keep track of the predecessor node each time a label is updated. Basic Idea : Fan out from source and permanently label nodes in order of distance from the source.
Image of page 3

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

ISE 411 Lecture 9 3 Dijkstra’s Algorithm Input: An network G = ( N, A ) and a vector of arc lengths c Z A + Output: d ( i ) is the length of a shortest path from node s to node i and pred(i) is the immediate predecessor of i in an associated shortest paths tree. S := ¯ S := N d ( i ) ← ∞∀ i N d ( s ) 0 and pred ( s ) 0 while | S | < n do let i ¯ S be the node for which d ( i ) = min { d ( j ) : j ¯ S } S S ∪ { i } ¯ S ¯ S \ { i } for ( i, j ) A ( i ) do if d ( j ) > d ( i ) + c ij then d ( j ) d ( i ) + c ij and pred ( j ) i end if
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '14
  • TedRalphs
  • Graph Theory, Binary heap, Priority queue

{[ 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