File:Floyd-Warshall example.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
Source: Wikipedia, the free encyclopedia.

Original file(SVG file, nominally 1,324 × 535 pixels, file size: 120 KB)

Summary

Description
English: Demonstration of Floyd-Warshall algorithm for all-pairs shortest path on a directed graph with 4 vertices. At k=0, prior to the first iteration of the outer loop, the only known paths correspond to single edges in the original graph. At k=1, paths that go through the vertex 1 are found: in particular, the path 2→1→3 is found, replacing the path 2→3 which has less edges but is longer. At k=2, paths going through the vertices {1,2} are found. The red and blue boxes show how the path 4→2→1→3 is assembled from the known paths 4→2 and 2→1→3 encountered in previous iterations. The path 4→2→3 is not considered, because it is already known that 2→1→3 is the shortest path from 2 to 3. At k=3, paths going through the vertices {1,2,3} are found. Finally, at k=4, all shortest paths are found.
Date
Source Own work
Author Dcoetzee
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with Inkscape…important.
 
 This file uses embedded text that can be easily translated using a text editor.

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

17 December 2012

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:39, 15 May 2013Thumbnail for version as of 13:39, 15 May 20131,324 × 535 (120 KB)CiaPanWeights corrected for path 3→4→2→1
10:21, 17 December 2012Thumbnail for version as of 10:21, 17 December 20121,324 × 535 (117 KB)DcoetzeeImprove spacing, alignment (uploaded wrong file before)
10:19, 17 December 2012Thumbnail for version as of 10:19, 17 December 20121,324 × 553 (115 KB)DcoetzeeImproved spacing, alignment
10:16, 17 December 2012Thumbnail for version as of 10:16, 17 December 20121,324 × 553 (115 KB)Dcoetzee{{Information |Description ={{en|1=Demonstration of Floyd-Warshall algorithm for all-pairs shortest path on a directed graph with 4 vertices. At k=0, prior to the first iteration of the outer loop, the only known paths correspond to single edges in ...
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

Metadata