Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics from LEDA library
Additional Terms Degree: degree of a vertex is the number of vertices adjacent to x (number of edges incident with x) V - set of vertices E - set of edges
Vertices and Edges vertex (node) - a point within a graph which may contain information ex: orange points are vertices edge - connects a pair of vertices, can be undirected or directed edges credit - demo/graph_alg/gw_basic_graph_algorithms
Multiple edges and Loops multiple edge: having two or more edges from the same two nodes shown by the red edges connecting node 2 and node 3 e 12 = (v 2, v 3 ) e 14 = (v 2, v 3 ) loop: an edge that starts and returns to the same node, a reflexive edge shown by the the rectangular edges e 79 = (v 3, v 3 ) e 10 = (v 0, v 0 ) credit: demo/graph_alg/gw_min_cut
Graph consists of a finite set of vertices together with a finite set of edges credit: demo/graph_alg/gw_ dijkstra
Undirected Graph vertices are connected with undirected edges able to move in either direction between vertices credit: demo/graph_alg/gw_basic_graph_algorithms
Directed Graph (Digraph) vertices are connected by directed edges each edge consists of an ordered pair of distinct vertices only able to move in the direction of the arrow credit: demo/graph_alg/ gw_dfs
Simple Graph does not contain multiple edges or loops credit: demo/graph_alg/gw_shortest_path
Multigraph some pairs of vertices joined by more than one edge ex: top two vertices joined with three edges credit: demo/graph_alg/gw_ mcb_matching
Complete Graph every pair of distinct vertices is joined by an edge credit: demo/graph_alg/gw_ scc
Bipartite Graph vertex set can be partitioned into two sets credit: demo/graph_alg/gw_ mcb_matching
Path in an Undirected Graph connects vertex x to y with a sequence of distinct edges, e 1, e 2, …., e k, such that e 1 = (x, x 1 ) … e k = (x k-1, y) every vertex other than the source and destination has incoming and outgoing of degree one credit: demo/graph_alg/gw_minimum_spanning_tree
Path in a Digraph connects vertex x to y through a sequence of distinct edges, e 1, e 2, …, e k such that e 1 = (x, x 1 ), e 2 = (x 1, x 2 ), …., e k = (x k-1, y) for some vertices x 1, x 2,…, x k-1 every vertex other than the source and destination has incoming and outgoing of degree one edges are pointing in the same direction ex: path from v 3 to v 0 credit: demo/graph_alg/gw_scc
Cycle in an Undirected Graph a path from x to itself vertices have degree 2 ex: vertex 0, vertex 1, vertex 2, vertex 3 are all within a cycle credit: demo/graphwin/graph win
Cycle in a Digraph path from a vertex to itself ex: vertex 1:6 goes out and returns to itself, it has a cycle credit: demo/graph_alg/ gw_dfs
Cyclic Digraph directed graph with a cycle credit: demo/graph_alg/ gw_dfs
Acyclic Digraph directed graph with no cycles credit: demo/graph_alg/ gw_dfs
Hamilton Path in an Undirected Graph one path covering all vertices contains exactly V-1 edges credit: demo/graph_alg/gw_mc_matching
Hamilton Path in a Digraph one path covering all vertices edges are in the same direction contains exactly V-1 edges ex: vertex S to vertex T contains a Hamilton Path credit: demo/graph_alg/gw_min_ cost_flow
Hamilton Cycle in an Undirected Graph one cycle covering all vertices contains exactly V edges credit: demo/graph_alg/gw_b asic_graph_algorithms
Hamilton Cycle in a Digraph one cycle covering all vertices all vertices are connected by edges in the same direction contains exactly V edges credit: demo/graph_alg/gw_mi n_cost_flow
Tree connected graph with no cycles credit: demo/graph_alg/gw_b asic_graph_algorithms
Forest graph with no cycles components of trees credit: demo/graph_alg/gw_ mw_matching
Subgraph subset of the set of edges maintain the set of vertices ex: right graph is a subset of the left graph removed e 1, e 3, e 9, e 12, credit:demo/graphwin/graphwin
Induced Subgraph subset of the set of vertices maintains all the edges of the remaining vertices ex: right graph is a subset of the left graph removed: v 0, v 5 credit: demo/graphwin/graphwin