Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Graph Theory - Discrete Mathematics, Slides of Discrete Mathematics

Explain in graph theory: Theorems, representation of graphs data structures, traversal, graph optimization and planarity and colorings.

Typology: Slides

2021/2022

Uploaded on 03/31/2022

rubytuesday
rubytuesday 🇺🇸

4.4

(38)

274 documents

1 / 120

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Graph Theory
MAT230
Discrete Mathematics
Fall 2019
MAT230 (Discrete Math) Graph Theory Fall 2019 1 / 72
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Graph Theory - Discrete Mathematics and more Slides Discrete Mathematics in PDF only on Docsity!

Graph Theory

MAT

Discrete Mathematics

Fall 2019

Outline

(^1) Definitions

2 Theorems

(^3) Representations of Graphs: Data Structures

(^4) Traversal: Eulerian and Hamiltonian Graphs

(^5) Graph Optimization

6 Planarity and Colorings

Definitions

Definition

Two vertices that are joined by an edge are called adjacent vertices.

Definition

A pendant vertex is a vertex that is connected to exactly one other vertex by a single edge.

Definition

A walk in a graph is a sequence of alternating vertices and edges v 1 e 1 v 2 e 2... vnenvn+1 with n ≥ 0. If v 1 = vn+1 then the walk is closed. The length of the walk is the number of edges in the walk. A walk of length zero is a trivial walk.

Definitions

Definition

A trail is a walk with no repeated edges. A path is a walk with no repeated vertices. A circuit is a closed trail and a trivial circuit has a single vertex and no edges. A trail or circuit is Eulerian if it uses every edge in the graph.

Definition

A cycle is a nontrivial circuit in which the only repeated vertex is the first/last one.

Definition

A simple graph is a graph with no loop edges or multiple edges. Edges in a simple graph may be specified by a set {vi , vj } of the two vertices that the edge makes adjacent. A graph with more than one edge between a pair of vertices is called a multigraph while a graph with loop edges is called a pseudograph.

Definitions

Definition

A graph is connected if there is a walk between every pair of distinct vertices in the graph.

Definition

A graph H is a subgraph of a graph G if all vertices and edges in H are also in G.

Definition

A connected component of G is a connected subgraph H of G such that no other connected subgraph of G contains H.

Definition

A graph is called Eulerian if it contains an Eulerian circuit.

Definitions

Definition

A tree is a connected, simple graph that has no cycles. Vertices of degree 1 in a tree are called the leaves of the tree.

Definition

Let G be a simple, connected graph. The subgraph T is a spanning tree of G if T is a tree and every node in G is a node in T.

Definition

A weighted graph is a graph G = (V , E ) along with a function w : E → R that associates a numerical weight to each edge. If G is a weighted graph, then T is a minimal spanning tree of G if it is a spanning tree and no other spanning tree of G has smaller total weight.

Definitions

Definition

Simple graphs G and H are called isomorphic if there is a bijection f from the nodes of G to the nodes of H such that {v , w } is an edge in G if and only if {f (v ), f (w )} is an edge of H. The function f is called an isomorphism.

Definition

A simple, connected graph is called planar if there is a way to draw it on a plane so that no edges cross. Such a drawing is called an embedding of the graph in the plane.

Definition

For a planar graph G embedded in the plane, a face of the graph is a region of the plane created by the drawing. The area of the plane outside the graph is also a face, called the unbounded face.

Theorems

Theorem

Let G be a connected graph. Then G is Eulerian if and only if every vertex in G has even degree.

Theorem (Handshaking Lemma)

In any graph with n vertices vi and m edges

∑^ n

i=

deg(vi ) = 2m

Corollary

A connected non-Eulerian graph has an Eulerian trail if and only if it has exactly two vertices of odd degree. The trail begins and ends these two vertices.

Theorems

Theorem (Kuratowski’s Theorem)

A graph G is nonplanar if and only if it contains a “copy” of K 3 , 3 or K 5 as a subgraph.

Theorem (Euler’s Formula for Planar Graphs)

For any connected planar graph G embedded in the plane with V vertices, E edges, and F faces, it must be the case that

V + F = E + 2.

Graphs vs Plots

Recall that a graph consists of two sets: a set of vertices and a set of edges.

While we often represent graphs visually, we can distinguish between a graph and a plot in the following way: A graph stores information and connections between information while a plot provides a visual representation of the information stored in a graph.

Given that graphs are important, we now examine how we can represent graphs using a computer and see how one computer package handles graphs.

Adjacency Matrices

Let G be a graph with n vertices. We can use an n × n matrix to store the graph. Let

gij =

1 if vertex i is adjacent to vertex j 0 if vertex i is not adjacent to vertex j

For example, the graph on the left has the adjacency matrix on the right.

Note: matrix is symmetric

The adjacency matrix for a directed graph will not be symmetric unless the directed graph itself is symmetric.

Sparse Graphs and Matrices

Consider K 30 , the complete graph with 30 vertices. This graph has C (30, 2) = 435 edges since every vertex is connected to every other vertex. The adjacency matrix will have 1’s in every non-diagonal position (why not on the diagonals?). We say the 30 × 30 adjacency matrix is dense or full since most of the entries are non-zero.

Now consider C 30 , a cycle (or ring) graph with 30 vertices. Each vertex is connected to two other vertices to form a single ring or cycle. This means there are only 30 edges. So, while the adjacency matrix will be 30 × 30, only 60 entries in it will be non-zero. In this case we say the graph and the adjacency matrix are sparse.

Edge Lists

Note that in the case of undirected graphs we really only need the upper-right triangle or the lower-left triangle (about half) of the adjacency matrix to store the information in the graph.

In the case of directed graphs, we need the full matrix.

In either case, if the graph is sparse, there are more efficient ways to store the graph. One of these is to maintain an edge list.

Edge Lists

(^1) Edge List v1: For each vertex, store a list of vertices that the vertex is adjacent to. (^2) Edge List v2: Store all edges in the graph as a list of ordered pairs.

Adjacency Matrix    

Edge List v

Edge List v

Which version we choose to use is largely dependent on how we need to access the information.