Graphs (continued) Dijkstra Algorithm - Greedy because once a node is considered, it will not considered again. * This contributes to its inefffective performance when negative edges are present. Need a different algorithm --> Bellman-Ford - Considers each vertex multiple times until all possibilities are exhausted. - As with Dijkstra, finds the least cost to al other vertices in the graph * Must be reachable from source vertex. * Algorithm proceeds by finding costs one step further from each vertex. -> When a lower cost is found, that vertex's total cost is updated. -> To avoid cycles, must keep track of visited vertices. Transitive closure - All possible paths between all vertices. - Indirect paths between vertices are identified and noted. - In an unweighted graph, it shows all connections between vertices, * where you can get to from each vertex - In a directed graph, it can show the minimum cost from each vertex to all other vertices.