SUNY Geneseo Department of Computer Science


The Floyd-Warshall Algorithm

Tuesday, March 26

CSci 242, Spring 2013
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Questions?

Floyd-Warshall Algorithm

Problem?

Carry it out

A weighted graph on 6 vertices

  1 2 3 4 5 6
1 0 5 1
2 0 2 3
3 2 0
4 0 4
5 0 1
6 -3 0
  1 2 3 4 5 6
1 0 5 1
2 0 2 3
3 2 7 0 3
4 0 4
5 0 1
6 -3 0
  1 2 3 4 5 6
1 0 5 7 1 8
2 0 2 3
3 2 7 0 3 8
4 0 4
5 0 1
6 -3 -1 0 0
  1 2 3 4 5 6
1 0   7      
2   0 2      
3 2 7 0 3 8
4 0 4
5 0 1
6     -1     0

Hand out Floyd-Warshall problem set

Next

Another approach to shortest paths

Chapter 24 introduction + Section 24.3


Next Lecture