Chapter 10: Graphs

10.1 - Introduction to Graphs

Definition 1 (Graph). A graph G = (V,E) consists of a nonempty set V of vertices (or nodes) and a set E of edges. V may be finite or infinite – if V is finite we say the graph is finite, if V is infinite then we say the graph is infinite. Every edge has either one or two vertices associated with it, called its endpoints. An edge is said to connect its endpoints.

Example 1.

Definition 2 (Types of Graphs).

Simple Graph: Undirected edges, no multiple edges, no loops.

a

f b

e c

d

Multigraph: Undirected edges, multiple edges allowed, no loops.

a

f b

e c

d

Pseudograph: Undirected edges, multiple edges allowed, loops allowed.

a

f b

e c

d

1 Digraph: Directed edges, no multiple edges [in the same direction], loops allowed.

a

f b

e c

d

Simple (Simple Digraph): Directed edges, no multiple edges, no loops.

a

f b

e c

d

Directed : Directed edges, multiple edges allowed, loops allowed.

a

f b

e c

d

Mixed Graph: Anything goes.

a

f b

e c

d

2 10.2 - Terminology and Special Graphs

Definition 3. Two vertices u and v in an undirected graph G are said to be adjacent (or neighbors) if and only if u and v are endpoints of the same edge e of G. The edge e is said to be incident with u and v and said to connect u and v.

Definition 4 (Neighborhood). The set of all neighbors of a vertex v in a graph G = (V,E) is denoted by N(v) and is called the neighborhood of v. If A ⊆ V then the set of all vertices in G that are adjacent to at least one vertex in A is [ N(A) = N(v). v∈A

Definition 5 (Degree). The degree of a vertex v in an undirected graph, denoted deg(v), is the number of edges incident with v. A at v contributes twice to the degree of v.

Theorem 1 (The Handshaking Theorem). Suppose G = (V,E) is an undirected graph with |E| = m. Then X 2m = deg(v). v∈V

Definition 6. Suppose (u, v) is an edge of a directed graph G. Then u is said to be adjacent to v and v is said to be adjacent from u. We say that u is the initial vertex of (u, v) and that v is the terminal vertex of (u, v).

Definition 7 (Degree). Let G be a directed graph. The in-degree of a vertex v is the number of edges with v as their terminal vertex, and is denoted by deg−(v). The out-degree of v is the number of edges with v as their initial vertex, and is denoted by deg+(v). A loop at v adds 1 to both the in- and out-degrees.

3 Special Graphs

Complete Graphs Kn, n ≥ 1

Vertex set V = {v1, v2, v3, . . . , vn}. Edge set E = {(vi, vj) | 1 ≤ i < j ≤ n} (i.e., all possible edges).

Cycles Cn, n ≥ 3

Vertex set V = {v1, v2, v3, . . . , vn}. Edge set E = {(v1, v2), (v2, v3), (v3, v4),... (vn−1, vn), (vn, v1)}.

Wheels Wn, n ≥ 3

Vertex set V = {v1, v2, v3, . . . , vn, vn+1}. Edge set E = {(v1, v2), (v2, v3), (v3, v4),... (vn−1, vn), (vn, v1), (vn+1, v1), (vn+1, v2), (vn+1, v3),..., (vn+1, vn)}.

n-Cubes Qn,, n ≥ 1

4 Bipartite Graphs

Definition 8 (Bipartite Graph). A pseudograph [i.e., undirected, multiple edges and loops allowed] G = (V,E) is said 1 to be bipartite iff there is a “two-set partition {V1,V2} of V ” such that every edge e ∈ E has one of its endpoints in V1 and the other in V2.

Complete Bipartite Graphs Km,n

A simple bipartite graph with m + n vertices and as many edges as possbile:

Theorem 2. A simple graph is bipartite iff it is possible to assign one of two different colors to each vertex of the graph so that no two adjacent vertices are assigned the same color.

1 In this context this means that V1 ∪ V2 = V and V1 ∩ V2 = ∅.

5 Creating New Graphs from Old   Definition 9 (Subgraph). A graph Ge = V,e Ee is a subgraph of G = (V,E) iff Ve ⊆ V and Ee ⊆ E.

Definition 10 (Union and Intersection). The union of two graphs G1 = (V1,E1) and G2 = (V2,E2) is G1 ∪ G2 = (V1 ∪ V2,E1 ∪ E2).

The intersection of G1 and G2 is G1 ∩ G2 = (V1 ∩ V2,E1 ∩ E2).

Definition 11 (Complement). The complement of a graph G = (V,E) is the graph

G = V, E = {all possible edges that are not also in E} .

Example 2.

a a

f b f b

e c e c

d d

G1 G2

(a) Is the following graph a subgraph of either G1 or G2? f b

c

d

(b) Find G1, G2, G1 ∪ G2, and G1 ∩ G2.

6 10.4 - Connectivity

Definition 12 (Path of Length n). Let G = (V,E) be a pseudograph and let n be a positive integer. A path of length n between vertices v and w is a sequence of edges e1, e2, . . . , en ∈ E such that e1 = {v, v1}, e2 = {v1, v2},..., en−1 = {vn−2, vn−1}, en = {vn−1, w} for some v1, v2, . . . , vn−1 ∈ V .

Example 3. a b

e

d c

Definition 13 (Circuit). A circuit of length n is a path of length n with v = w (i.e., the same starting and ending vertex).

Definition 14 (Simple Path/Circuit). A simple path or simple circuit is one in which no edge is repeated.

Definition 15 (Connected). An undirected graph is said to be connected if and only if there is a path between every pair of distinct vertices.

Example 4. a b a b

d d c c

Definition 16 (Disconnecting). We say that we have disconnected a graph when, given a connected graph, we remove vertices or edges (or both) to form a disconnected graph.

Example 5. (10.4.1)

a b c Are these paths? If so are they simple? circuits? What is the length?

1. a, e, b, c, b

2. a, e, a, d, b, c, a d e 3. e, b, a, d, b, e

4. c, b, d, a, e, c

7 10.5 - Euler and Hamilton Paths

Definition 17 (Euler Path). An Euler path is a simple path containing every edge of G.

Definition 18 (Euler Circuit). An Euler circuit is a simple circuit containing every edge of G.

Definition 19 (Hamilton Path). A simple path that passes through every vertex exactly once is called a Hamilton path.

Definition 20 (Hamilton Circuit). A simple circuit that passes through every vertex exactly once is called a Hamilton circuit.

(The preceding definitions all hold for directed and undirected graphs.) Recall that a multigraph is an undirected graph in which multiple edges are allowed but loops are not allowed.

Theorem 3. A connected multigraph with |V | ≥ 2 has an Euler circuit if and only if each of its vertices has even degree.

Theorem 4. A connected multigraph has an Euler path (but not an Euler circuit) if and only if it has exactly two vertices of odd degree.

(The book has the reader prove analogous theorems for directed graphs in the exercises.)

Theorem 5 (Dirac’s Theorem). If G is a simple graph with n ≥ 3 vertices such that the degree of every vertex in G is n ≥ 2 then G has a Hamilton circuit.

Theorem 6 (Ore’s Theorem). If G is a simple graph with n ≥ 3 vertices such that deg(u) + deg(v) ≥ n for every pair of non-adjacent vertices u, v ∈ G then G has a Hamilton circuit.

Example 6. Determine whether there exists an Euler circuit (if so, draw one). If no Euler circuit then determine whether it has an Euler path (if so, draw one).

1. (10.5.2)

2. (10.5.4)

8 10.7 - Planar Graphs

Definition 21 (Planar). A graph is planar if and only if it can be drawn in the plane without any crossing edges.

Example 7. K5 and K3,3 are not planar.

Q3 is planar:

K2,3 is planar:

Theorem 7 (Euler’s Formula). Let G = (V,E) be a connected simple planar graph and let r be the number of regions in a planar representation of G. Then r = |E| − |V | + 2.

Corollary 8. Let G = (V,E) be a connected simple graph with |E| = e and |V | = v ≥ 3.

1. If G is planar then e ≤ 3v − 6. So, if e > 3v − 6 then G is not planar.

2. If G is planar then there exists a vertex of degree ≤ 5. So, if the degrees of all vertices are > 5 then G is not planar. 3. Suppose G also has no circuits of length 3. If G is planar then e ≤ 2v − 4. So, if e > 2v − 4 then G is not planar.

Note that in the preceeding corollary the contrapositive is the more useful form of the result if our goal is to determine whether a graph is not planar.

Example 8. K5

Example 9. K3,3

9 Definition 22 (Elementary Subdivision). An elementary subdivision of a graph is the operation whereby we remove an edge {u, v} and add a vertex w and the edges {u, w} and {w, v}

Definition 23 (Homeomorphic). Two graphs G1 and G2 are said to be homeomorphic if and only if they can be obtained from the same graph by a sequence of elementary subdivisions.

Theorem 9 (Kuratowski’s Theorem). A graph is nonplanar if and only if it contains a subgraph homeomorphic to either K5 or K3,3.

Example 10.

10