[ACE] Graphs
Graph Definition of a graph A graph is a set of nodes, or vertices, connected by edges. Graphs can be undirected - edges don’t have direction directed - edges have direction Undirected graphs can be represented as directed graphs where for each edge (X,Y) there is a corresponding edge (Y,X) . Graphs can also be unweighted weighted - edges have weights Notation Set V of vertices (nodes) Set E of edges (E⊂V*V) Node B is adjacent to A if there is an edge from A to B.(A —–>B) Paths and reachability A path from A to B is a sequence of vertices A1,…,An such that there is an edge from A to A1, from A1 to A2,… from An to B Vertex B is reachable from A if there is a path from A to B Other Terminology A cycle is a path from a vertex to itself Graph is acyclic if it does not have cycles Graph is connected if there is a path between every pair of vertices Graph is strongly connected if there is a path in both directions between every pair of vertices how t...