Bellman-Ford algorithm is simplified