Similar presentations

3
§8.1 – Graphs Graph –A graph G consists of a finite set of vertices V, a finite set of edges E, and a function γ that assigns a subset of vertices {v, w} to each edge (v may equal w) –If e is an edge, and γ(e) = {v, w} we say e is the edge between v & w, and that v & w are the endpoints of e

4
§8.1 – Graphs Terminology –Degree of a vertex Number of edges having that vertex as an endpoint –Loop Edge from a vertex to itself Contributes 2 to the degree of a vertex –Isolated vertex Vertex with degree 0 –Adjacent vertices Vertices that share an edge

6
§8.1 – Graphs More terminology –Circuit Path that begins and ends at the same vertex –Simple path No vertex appears more than once (except possibly the first and last) –Simple circuit Simple path where first and last vertices are equal

7
§8.1 – Graphs Special types of graphs –Connected graph  path from every vertex to every other (different) vertex –Disconnected graph There are at least 2 vertices which do not have a path between them components –Regular Graph All vertices have the same degree

10
§8.1 – Graphs Quotient graphs –If G = (V, E, γ) and R is an equivalence relation on V, then G R is the quotient graph found by merging all vertices within the same equivalence classes.

11
CSCI 115 §8.2 Euler Paths and Circuits

12
§8.2 – Euler Paths and Circuits A path in a graph G is an Euler path if it includes every edge exactly once An Euler circuit is an Euler path that is also a circuit

13
§8.2 – Euler Paths and Circuits Theorem If G has a vertex of odd degree, there can be no Euler circuit of G 2.If G is a connected graph and every vertex has even degree then there is an Euler circuit in G Theorem If a graph G has more than 2 vertices of odd degree, there can be no Euler path in G 2.If G is connected and has exactly 2 vertices of odd degree, then there exists an Euler path in G. Any Euler path must begin at one vertex of odd degree, and end at the other.

14
§8.2 – Euler Paths and Circuits Theorem and –Existence theorems Bridge –A bridge is an edge in a connected graph that if removed would result in a disconnected graph

17
§8.3 – Hamiltonian Paths and Circuits A Hamiltonian path is a path that contains each vertex exactly once A Hamiltonian circuit is a Hamiltonian path that is also a circuit

18
§8.3 – Hamiltonian Paths and Circuits Theorem –Let G be a connected graph with n vertices (n  Z, n  2), with no loops or multiple edges. G has a Hamiltonian circuit if for any 2 vertices u and v of G that are not adjacent, the degree of u plus the degree of v is  n. Corollary –G has a Hamiltonian circuit if each vertex has degree  (n/2).

19
§8.3 – Hamiltonian Paths and Circuits Theorem –Let the number of edges of G be m. Then G has a Hamiltonian circuit if m  ½(n 2 – 3n + 6) where n is the number of vertices.