Graph Terminology ----------------- Def: A GRAPH, G is a pair G=(V,E) where * V is a finite nonempty set (the "vertices", or "nodes") * E is a set of 2-element subsets of V (the "edges") Lots of definitions based on this ................................. * If {v,w} \in E then v and w are ADJACENT. Adjacency is a relation on V x V, and we may right v-w instead of {v,w} \in E. * If e={v,w} is an edge of E, then edge e is INCIDENT to v. * The NEIGHBOR SET of v, N(v), is the set of vertices adjacent to v: N(v) = {w\in V: {v,w} in E} * the DEGREE of v, d(v), is |N(v)|. * a PATH in G is a sequence v_1, v_2, ..., v_k such that {v_i,v_{i+1}} in E for all 1 <= i <= k-1. * Write v --- w if there is path from v to w. This is an equivalence relation. Equivalently: v---w is the reflexive/transitive closure of the adjacency relation, - . * The blocks of v---w are the COMPONENTS of G. In other words, v and w are in the same component if there is a path from v to w. * A CYCLE in G is a sequence of 3 or more vertices C=(v_1, ..., v_k) such that v_i - v_{i+1} for each 1<= i < j, and v_1 - v_k. Sometimes we think of a cycle as containing edges: the cycle C contains the edges {v_1,v_2}, {v_2,v_3}, ..., {v_{k-1},v_k}, {v_1,v_k}. The vertices of C is the SET of vertices that appear in the sequence (v_1, ..., v_k). The same terminology applies to the vertices and edges of a path P. * A graph is ACYCLIC if it has no cycle. * A TREE is a connected acyclic graph. * A FOREST is a acyclic graph (ie, a bunch of trees). * Let G=(V,E) be a tree. Then a LEAF of G is a node of degree 1. An isolated node is also a leaf. * A graph G=(V,E) on m edges is EULERIAN if it has a cycle C=(v_1,..., v_m) where the edges of C are E (that is, each edge is used once and only once in C). * A graph G=(V,E) on n vertices is HAMILTONIAN if it has a cycle C=(v_1,..., v_n) where the vertices of C are exactly V (that is, each vertex is used once and only once). Simple results .............. Proposition: Every tree has a leaf. Proposition: A tree on n vertices has n-1 edges. Proposition: A connected graph on n vertices and n-1 edges is A tree (that is, it is acyclic). Proposition: A graph on n vertices has at most C(n,2) = n(n-1)/2 edges. Proposition: Let G=(V,E) be a graph on n vertices and m edges. Then m = (1/2) \sum_{v\in V} d(v) Theorem [Euler]: Let G be a graph on 3 or more vertices. Then G is Eulerian iff each vertex of G is of even degree.