#8714: add Bellman-Ford algorithm for shortest paths
---------------------------------+----------------------------------
Reporter: mvngu | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.13
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: David Coudert | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #12806 | Stopgaps:
---------------------------------+----------------------------------
Description changed by chapoton:
Old description:
> I'm using #698 as a wish list of items to add to the graph theory module
> of Sage. The purpose of this ticket is to implement the
> [http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm Bellman-
> Ford] algorithm for finding shortest paths in a weighted graph `G` that
> may have negative weights. If `G` doesn't have negative weights,
> Dijkstra's algorithm can be used. However, if `G` has negative weights,
> we fall back on the Bellman-Ford algorithm. The Bellman-Ford algorithm is
> able to handle graphs with negative weights, but not graphs that have
> negative-weight cycles. See also the function
> [http://reference.wolfram.com/mathematica/Combinatorica/ref/BellmanFord.html
> BellmanFord] in Mathematica's
> [http://reference.wolfram.com/mathematica/Combinatorica/guide/CombinatoricaPackage.html
> Combinatorica] package. See this [http://code.google.com/p/graph-theory-
> algorithms-book/ graph theory book] for an algorithmic presentation of
> the Bellman-Ford algorithm.
>
> See also the [/wiki/GraphTheoryRoadmap graph theory roadmap].
>
> APPLY:
> * trac_8714.2.patch
New description:
I'm using #698 as a wish list of items to add to the graph theory module
of Sage. The purpose of this ticket is to implement the
[http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm Bellman-Ford]
algorithm for finding shortest paths in a weighted graph `G` that may have
negative weights. If `G` doesn't have negative weights, Dijkstra's
algorithm can be used. However, if `G` has negative weights, we fall back
on the Bellman-Ford algorithm. The Bellman-Ford algorithm is able to
handle graphs with negative weights, but not graphs that have negative-
weight cycles. See also the function
[http://reference.wolfram.com/mathematica/Combinatorica/ref/BellmanFord.html
BellmanFord] in Mathematica's
[http://reference.wolfram.com/mathematica/Combinatorica/guide/CombinatoricaPackage.html
Combinatorica] package. See this [http://code.google.com/p/graph-theory-
algorithms-book/ graph theory book] for an algorithmic presentation of the
Bellman-Ford algorithm.
See also the [/wiki/GraphTheoryRoadmap graph theory roadmap].
APPLY:
* [attachment:trac_8714.2.patch]
* [attachment:trac_8714_addon1.patch]
--
--
Ticket URL: <http://trac.sagemath.org/ticket/8714#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.