Talk:Floyd–Warshall algorithm: Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
m Signing comment by 96.57.23.82 - "Litmus Test: "
m Archiving 2 discussion(s) to Talk:Floyd–Warshall algorithm/Archive 1) (bot
Line 10:
{{WikiProject Computer science|class=B|importance=high}}
{{archives}}
 
== Optimization in Pseudocode ==
 
I've removed the optimization from the pseudocode. The point of pseudocode is not to show the most efficient method possible, but rather to illustrate how the algorithm works. It is expected that programmers will take simple optimizations into account. [[User:Stargazer7121|Stargazer7121]] ([[User talk:Stargazer7121|talk]]) 21:39, 8 February 2013 (UTC)
 
== Path reconstruction Incorrect ==
Line 20 ⟶ 16:
 
:This section has undergone several iterations since this comment was made. [[Special:Contributions/98.209.119.23|98.209.119.23]] ([[User talk:98.209.119.23|talk]]) 22:05, 29 April 2014 (UTC)
 
== Negative Cycles ==
 
In my opinion the section about negative cycles is wrong in the sense that it is stated that there is no shortest path, because traversing the cycles multiple times makes the length arbitrarily small. But in the context of shortest paths one usually talks about (''simple'') paths and not walks, i.e., multiple traversal is not allowed. And then of course (since there are only finitely many simple paths), a shortest path is well-defined. In this case, the algorithm just fails since the concatenation of the shortest i-(k+1)-path and the shortest (k+1)-j-path (both using only vertices 1 up to k as inner vertices) does not necessarily result in a simple path since it may contain a cycle.
 
[[User:MatthiasWalter|MatthiasWalter]] ([[User talk:MatthiasWalter|talk]]) 08:51, 10 December 2013 (UTC)
 
== Simpler path reconstruction ==