Bellman-Ford algorithm

For now, see http://en.wikipedia.org/wiki/Bellman-Ford_algorithm