Bellman-Ford and DAGS shortest paths