Graphs (continued) 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. Spanning Tree - A subgraph that: * Includes all vertices * Has no cycles - A minimum spanning tree is possible with a graph with weighted edges. Prim's Algorithm - After choosing initial edge (and marking it as having been chosen), we look to choose edges between vertices that have and haven't yet been marked Kruskal - Ordering of edges. Select cheapest edge and use if possible. - Vertices are arranged in what is termed a 'forest'. * Connected edges are listed together in sets. * Eventually, the spanning tree will be held in a single set * We want to find edges that bridge one set to another