Adding Graph structure, completing with acyclic test, Bellman-Ford algorithm, and DFS  algorithm