Download presentation

Presentation is loading. Please wait.

Published byIsabela Sidders Modified about 1 year ago

1
CSCI 115 Chapter 8 Topics in Graph Theory

2
CSCI 115 §8.1 Graphs

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

5
§8.1 – Graphs Path –A path in a graph G consists of a pair of sequences (V , E ), V : v 1, v 2, …, v k and E : e 1, e 2, …, e k–1 s.t.: 1.γ(e i ) = {v i, v i+1 } i 2.e i e j i, j

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

8
§8.1 – Graphs Special families of graphs (n Z + ) –U n : The discrete graph on n vertices The graph with n vertices and no edges –K n : The complete graph on n vertices The graph with n vertices, and an edge between every pair of vertices –L n : The linear graph on n vertices The graph with n vertices and edges {v i, v i+1 } i {1, 2, …, n – 1}

9
§8.1 – Graphs Subgraphs –If G = (V, E, γ) and E 1 E, V 1 V s.t. V 1 contains (at least) all of the end points of edges in E 1, then H = (V 1, E 1, γ) is a subgraph of G –If G = (V, E, γ) and e E, then G e is the subgraph found by deleting e from G and keeping all vertices

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

15
§8.2 – Euler Paths and Circuits Fleury’s Algorithm for finding an Euler circuit for a connected graph where every vertex has even degree (let G = V, E, γ ) 1.Select and edge e 1 of G with vertices (v 1, v 2 ) that is not a bridge. Let be (V : v 1, v 2, E : e 1 ). Remove e 1 from E and v 1 and v 2 from V to create G 1. 2.Suppose V : v 1, v 2, …, v k and E : e 1, e 2, …, e k–1 have been constructed to form G k–1. Select e k in G k–1 that has v k as a vertex and is not a bridge in G k–1 (discounting v k ). Extend V to v 1, v 2, …, v k, v k+1 and E to e 1, e 2, …, e k–1, e k. 3.Repeat step 2 until no edges remain in E.

16
CSCI 115 §8.3 Hamiltonian Paths and Circuits

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.

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google