This document defines and provides examples of various graph concepts from discrete mathematics including:
- Complete graphs, cycle graphs, wheel graphs, and hypercubes as special types of simple graphs
- Bipartite graphs and complete bipartite graphs
- Subgraphs and unions of graphs
- Representing graphs using adjacency lists and matrices
- Graph isomorphism
It includes over 20 examples applying these graph concepts and definitions.
1. 8 CSC1001 Discrete Mathematics 11 - Graphs
Definition 7
Let G = (V ,E) be a graph with directed edges. Then
∑ deg
v∈V
−
( v) = ∑ deg + ( v) = E
v∈V
Example 6 (8 points) Find the in-degree and out-degree of each vertex in the graph G with directed edges
shown in Figure.
Example 7 (12 points) Find the in-degree and out-degree of each vertex in the graph G with directed edges
shown in Figure.
2. Some Special Simple Graphs
Definition 8
A complete graph on n vertices, denoted by Kn, is a simple graph that contains exactly one edge
between each pair of distinct vertices.
Definition 9
A cycle graph on n vertices (n ≥ 3), denoted by Cn, consists of n vertices v1, v2, . . . , vn and edges {v1, v2},
{v2, v3}, . . . , {vn-1, vn}, and {vn, v1}.
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
2. Graphs - 11 CSC1001 Discrete Mathematics 9
Definition 10
A wheel graph on n vertices (n ≥ 3), denoted by Wn, when we add an additional vertex to a cycle Cn and
connect this new vertex to each of the n vertices in Cn, by new edges.
Definition 11
An n-dimensional hypercube, or n-cube, denoted by Qn, is a graph that has vertices representing the 2n
bit strings of length n.
3. Bipartite Graphs
Definition 12
A simple graph G is called bipartite if its vertex set V can be partitioned into two disjoint sets V1 and V2
such that every edge in the graph connects a vertex in V1 and a vertex in V2 (so that no edge in G
connects either two vertices in V1 or two vertices in V2). When this condition holds, we call the pair (V1, V2)
a bipartition of the vertex set V of G.
Showing that C6 is bipartite.
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
3. 10 CSC1001 Discrete Mathematics 11 - Graphs
Example 8 (4 points) Are the graphs G and H displayed in Figure bipartite?
Example 9 (2 points) Is the graphs displayed in Figure bipartite?
Example 10 (2 points) Is the graphs displayed in Figure bipartite?
Definition 13
A complete bipartite graph Km,n is a graph that has its vertex set partitioned into two subsets of m and n
vertices, respectively with an edge between two vertices if and only if one vertex is in the first subset and
the other vertex is in the second subset.
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
4. Graphs - 11 CSC1001 Discrete Mathematics 11
4. New Graphs from Old
Definition 14
A subgraph of a graph G = (V ,E) is a graph H = (W, F), where W ⊆ V and F ⊆ E. A subgraph H of G is a
proper subgraph of G if H ≠ G.
Definition 15
The union of two simple graphs G1 = (V1,E1) and G2 = (V2,E2) is the simple graph with vertex set V1 ∪ V2
and edge set E1 ∪ E2. The union of G1 and G2 is denoted by G1 ∪ G2.
Example 11 (6 points) Draw all subgraphs of this graph.
Example 12 (4 points) Find the union of the given pair of simple graphs. (Assume edges with the same end-
points are the same.)
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
5. 12 CSC1001 Discrete Mathematics 11 - Graphs
Example 13 (4 points) Find the union of the given pair of simple graphs. (Assume edges with the same end-
points are the same.)
3 Representing Graphs and Graph Isomorphism
1. Representing Graphs
Definition 1
One way to represent a graph without multiple edges is to list all the edges of this graph using adjacency
lists, which specify the vertices that are adjacent to each vertex of the graph.
Example 14 (4 points) Use an adjacency list to represent the pseudograph
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
6. Graphs - 11 CSC1001 Discrete Mathematics 13
Definition 2
Suppose that G = (V ,E) is a simple graph where |V| = n. Suppose that the vertices of G are listed
arbitrarily as v1, v2, . . . , vn. The adjacency matrix A (or AG) of G, with respect to this listing of the vertices,
is the n x n zero–one matrix with 1 as its (i, j )th entry when vi and vj are adjacent, and 0 as its (i, j )th entry
when they are not adjacent.
Example 15 (4 points) Use an adjacency matrix to represent the graph in adjacency list example.
Example 16 (4 points) Draw a graph with the adjacency matrix
⎡0 1 0 1⎤
⎢0 0 0 0⎥
⎢ ⎥
⎢1 1 0 1⎥
⎢ ⎥
⎣0 1 1 0⎦
Example 17 (4 points) Draw a graph with the adjacency matrix
⎡1 0 1 1⎤
⎢0 1 0 1⎥
⎢ ⎥
⎢1 0 0 1⎥
⎢ ⎥
⎣1 1 1 1⎦
Example 18 (4 points) Use an adjacency matrix to represent the graph.
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
7. 14 CSC1001 Discrete Mathematics 11 - Graphs
Example 19 (4 points) Draw a graph with the adjacency matrix
⎡1 2 3 ⎤
⎢0 3 1 ⎥
⎢ ⎥
⎢ 2 3 2⎥
⎣ ⎦
Definition 3
Another common way to represent graphs is to use incidence matrices. Let G = (V ,E) be an undirected
graph. Suppose that v1, v2, . . . , vn are the vertices and e1, e2, . . . , em are the edges of G.
Example 20 (4 points) Represent the pseudograph shown in Figure using an incidence matrix
Example 21 (4 points) Represent the pseudograph shown in Figure using an incidence matrix
2. Isomorphism of Graphs
Definition 4
The simple graphs G1 = (V1,E1) and G2 = (V2,E2) are isomorphic if there exists a one-to-one and onto
function f from V1 to V2 with the property that a and b are adjacent in G1 if and only if f (a) and f (b) are
adjacent in G2, for all a and b in V1. Such a function f is called an isomorphism. Two simple graphs that are
not isomorphic are called nonisomorphic.
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
8. Graphs - 11 CSC1001 Discrete Mathematics 15
G and H are not isomorphic G and H are isomorphic
Example 22 (8 points) Determine whether the given pair of graphs is isomorphic.
1) Graph A
2) Graph B
3) Graph C
4) Graph D
มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี