0% found this document useful (0 votes)
441 views

Solutions: Homework Assignment #7

The document contains solutions to homework assignment problems involving graph theory concepts such as vertices, edges, degrees, isomorphism, adjacency lists/matrices, bipartiteness, and the pigeonhole principle. It provides worked examples and explanations for determining graph properties and checking if two graphs are isomorphic.

Uploaded by

Abigael J C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
441 views

Solutions: Homework Assignment #7

The document contains solutions to homework assignment problems involving graph theory concepts such as vertices, edges, degrees, isomorphism, adjacency lists/matrices, bipartiteness, and the pigeonhole principle. It provides worked examples and explanations for determining graph properties and checking if two graphs are isomorphic.

Uploaded by

Abigael J C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Homework Assignment #7

Solutions
1. Find the number of vertices, the number of edges, and the degree of each vertex
in the given undirected graph. Identify all isolated and pendant vertices

a b c d

f i h g e
The number of vertices, |V|, is 9.
The number of edges, |E|, is 12.
The degrees are deg(a)=3, deg(b)=2, deg(c)=4, deg(d)=0, deg(e)=6, deg(f)=0,
deg(g)=4, deg(h)=2, and deg(i)=3.
The isolated vertices are d and f. The graph has no pendant vertex.
2. Determine the number of vertices and edges and find the in-degree and
out-degree of each vertex for the given directed multigraph.
a b

d c
The number of vertices, |V|, is 4.
The number of edges, |E|, is 8.
The in-degrees and out-degrees are deg(a)=2, deg+(a)=2, deg(b)=3, deg+(b)=4,
deg(c)=2, deg+(c)=1, deg(d)=1, deg+(d)=1.
3. Show that in a simple graph with at least two vertices there must be two vertices
that have the same degree. (Hint: Use the pigeonhole principle.)
Let G=(V, E) be a simple graph and |V|=n. Since G is a simple graph, it has
neither cycles nor multi-edges. Hence, the degree of a vertex v in G must be
between 0 and n1, i.e., 0deg(v)n1. However, if there exists a vertex with
degree zero, all other vertices cannot have degree n1. Namely, vertices of G
cannot have degree zero and degree n1 at the same time. Therefore, there are
only n1 choices of degrees for n vertices of G. By the pigeonhole principle,
there must be at two vertices in V with the same degree.
4. Determine whether the graph is bipartite. You may find it useful to apply
Theorem 4 and answer the question by determining whether it is possible to
assign either red or blue to each vertex so that no two adjacent vertices are
assigned the same color.
(a) (b)
b c a b

f c
a d
e d
e
(a) First, assign red color to vertex a. Next, assign blue color to vertices b, c, and
d which are adjacent to vertex a. Finally, assign read color to vertex c. As the
graph shown on the left-hand-side, there are no two adjacent vertices having
the same color. Hence, by Theorem 4, this graph is a bipartite. In fact, it is
the complete bipartite K2,3 as the graph shown on the right-hand-side.

b c
a c

a d
b d e
(b) First, assign red color toevertex a. Next, assign blue color to vertices c, and f
which are adjacent to vertex a. Finally, assign read color to vertices b, d, and
e. As the graph shown on the left-hand-side, there are no two adjacent
vertices having the same color. Hence, by Theorem 4, this graph is a bipartite.
In fact, it is the complete bipartite K4,2 as the graph shown on the
right-hand-side.
a b
a b d e

f c

c f
e d
5. (i) Use an adjacency list to represent the following graphs. (ii) Use an adjacency
matrix to represent the following graphs.
(a) (b)
a b
a b

f c
c d
e d
(i) Adjacency tables:
(a) Vertex Terminal Vertices (b) Vertex Terminal Vertices
a c, f a a, b, c, d
b c, f b d
c a, b, d, e c a, b
d c, f d b, c, d
e c, f
f a, b, d, e
(ii) Adjacency matrixes:
(a) 0 0 1 0 0 1 (b) 1 1 1 1
0 0 1 0 0 1 [0 0 0 1].
1 1 0 1 1 0. 1 1 0 0
0 0 1 0 0 1 0 1 1 1
0 0 1 0 0 1
[1 1 0 1 1 0]

In Questions 6 to 8, if the pair of graphs is isomorphic, show the isomorphism


function and the corresponding adjacency matrices; otherwise, provide a rigorous
argument to explain why the pair of graphs is not isomorphic.
6. Determine whether the given pair of graphs is isomorphic.

u1 u2 v1

v7 v2
u7 u3

v6 v3
u6 u4

u5
v5 v4
Both graphs have seven vertices and seven edges and each vertex is of degree two.
We will try to find the isomorphism f of the two graphs. First, let us map vertex u1 to
v1, f(u1)=v1. Then, we map their adjacent vertices, say, f(u2)=v6 and f(u7)=v3.
Continually, we follow the adjacent vertices and obtain f(u3)=v4, f(u4)=v2, f(u5)=v7,
f(u6)=v5. We already have f(u7)=v3. Hence, the two graphs may be isomorphic. To
show they are indeed isomorphic, we will construct their corresponding adjacency
matrices as the below:
𝑢1 𝑢2 𝑢3 𝑢4 𝑢5 𝑢6 𝑢7 𝑣1 𝑣6 𝑣4 𝑣2 𝑣7 𝑣5 𝑣3
𝑢1 0 1 0 0 0 0 1 𝑣1 0 1 0 0 0 0 1
𝑢2 1 0 1 0 0 0 0 𝑣6 1 0 1 0 0 0 0
𝑢3 0 1 0 1 0 0 0 𝑣4 0 1 0 1 0 0 0
𝑢4 , and 𝑣2 0 0 1 0 1 0 0 .
0 0 1 0 1 0 0
𝑢5 0 0 0 1 0 1 0 𝑣7 0 0 0 1 0 1 0
𝑢6 0 0 0 0 1 0 1 𝑣5 0 0 0 0 1 0 1
𝑢7 [1 0 0 0 0 1 0] 𝑣3 [1 0 0 0 0 1 0]
Since the two adjacency matrices are identical, it implies the two graphs are
isomorphic.
7. Determine whether the given pair of graphs is isomorphic.
u1 v1
u8 u2 v8 v2

u7 u3 v7 v3

u6 u4 v6 v4
u5 v5
The complement of graph 𝐺 = (𝑉, 𝐸) is the graph 𝐺̅ = (𝑉, 𝑉 × 𝑉 − 𝐸). Also
we have the theorem that two graphs G and H are isomorphic if and only if their
complements 𝐺̅ and 𝐻 ̅ are isomorphic. Consider the complements of the above
graphs. Since the first complement has two cycles of length 4 and the second
complement has one cycle of length 8, they are not isomorphic. Hence, the
graphs given in the problem are not isomorphic.
u1 v1
u8 u2 v8 v2

u7 u3 v7 v3

u6 u4 v6 v4
u5 v5
8. Determine whether the given pair of directed graphs is isomorphic.
u1 v1

u4 v4

u2 u3 v2 v3

Both directed has four vertices and six edges. Each graph has two vertices with
in-degree 2 and out-degree 1 and two vertices with in-degree 1 and out-degree 2.
We will try to find the isomorphism f of the two graphs. First, let us map vertex
u1 to vertex v1, f(u1)=v1, because both of them have in-degree 1 and out-degree 2.
Since in the first graph, the incoming edge of vertex u1 comes from vertex u2,
and in the second graph, the incoming edge of vertex v1 comes from vertex v2,
we must map vertex u2 to vertex v2, f(u2)=v2. However, vertex u2 is of in-degree
1 and out-degree 2 and vertex v2 is of in-degree 2 and out-degree 1. This trial
mapping is not an isomorphism.
We will then try to map vertex u1 to another vertex of in-degree 1 and out-degree
2, i.e., vertex v3, f(u1)=v3. In the result, the isomorphism is f(u2)=v1, f(u4)=v2, and
f(u3)= v4. We construct the following adjacency matrices:
𝑢1 𝑢2 𝑢3 𝑢4 𝑣3 𝑣1 𝑣4 𝑣2
𝑢1 0 0 1 1 𝑣3 0 0 1 1
𝑢2 1 0 1 0 and 𝑣1 1 0 1 0
𝑢3 [0 0 0 1] 𝑣4 [0 0 0 1]
𝑢4 0 1 0 0 𝑣2 0 1 0 0
Since the two adjacency matrices are identical, the given graphs are isomorphic.
9. Find the strongly connected components of the following graph.
a b c

f e d
Since path c, d, e, c is a circuit, the circuit forms a strongly connected
components. Since no pairs of vertices a, b, and f have paths connecting them in
both directions, each of them forms a single-vertex strongly connected
component. Hence, the strongly connected components are {a}, {b}, {f}, and {c,
d, e} as below. c
a b

f e d
10. Find all the cut vertices and cut edges of the following graph.
a f

b c d e
Removing either vertex c or vertex d, the graph will leave two components.
Hence, either vertex c or vertex d is a cut vertex.
Removing edge {c, d}, the graph will leave two components. Hence, edge{c, d}
is a cut edge.
a f a f a f

b d e b c e b c d e
Remove vertex c Remove vertex d Remove edge {c, d}
from the graph. from the graph. from the graph.
11. For each of these graphs, find (G), (G), and minvV deg(v), and determine
which of the two inequalities in (G)  (G)  minvV deg(v) are strict.
(a) b d (b)
a b

a c c d e f
g e
g h i j
h f
k l
(a) Removing vertex c, the graph leaves two components. Hence, (G)=1.
Removing one edge does not disconnect the graph. But, removing two edges
{c, d} and {c, f}, the graph becomes two components. Hence, (G)=2. The
minimum degree of the graph is 3. Therefore, the inequality
(G)<(G)<minvV deg(v) is strict.
b d b d

a a c
g e g e

h f h f
Remove vertex c Remove edges {c, d}
from the graph. and {c, f} from the graph.

(b) Remove one vertex or one edge does not the graph. However, removing
vertices a and k or removing edges {a, b} and {k, l}, the graph becomes two
disconnected components. Hence, (G)=(G)=2. The minimum degree of the
graph is 3. Therefore, the inequality (G)=(G)<minvV deg(v) is not strict.
b a b

c d e f c d e f

g h i j g h i j

l k l
Remove vertices a and k Remove edges {a, b} and
from the graph. {k, l} from the graph.
12. Construct a graph G with (G)=1, (G)=2, and minvV deg(v)=3. Verify your
solution.
The following graph is (G)=1, (G)=2, and minvV deg(v)=3.
a e

i
b c g f

d h

To verify the solution, we show the following graph with removal of vertex i and
removal of edges {i, e} and {i, h}.
a e a e

i
b c f b c g f

d h d h
Remove vertex i, so Remove edges {i, e} and
=1 {k, l} from the graph, so =2.

You might also like