MST Model Answers
MST Model Answers
1. (a) Draw all the trails of length six from vertex A to D in a graph with the following adjacency matrix
A B C D E
0 1
A 0 1 1 1 1
B B1 0 1 1 0C
AG 1 = C B B1 1 0 1 1C
C
@
D 1 1 1 0 0A
E 1 0 1 0 0
D C E
A B
2. Determine the maximum number of vertices of a graph that has 35 edges and every vertex has degree
3.
Solution: (Assuming connectedness of the graph, as we do in class) the maximum number of vertices will
be in a graph that has the minimum possible number of edges required to keep the vertices connected.
We know such graph is in fact a tree, as removal of any edges makes a tree disconnected. There are
obviously trees satisfying the degree bound 3; for example, a path. For a tree, |E| = |V | 1. So,
|V | = 35 + 1 = 36. In general (without connectedness assumption), the number of vertices with given
number of edges can be arbitrarily large, as adding isolated vertices to any such graph still satisfies
the condition.
[3 + 3 marks]
3. (a) Determine whether the following graph is bipartite, explain your answer. Further, find the size of
the minimum edge cut set of its closure?
A B
F C
E D
Solution: Clearly the set of vertices {A, B, C, D} and {E, F } forms the bases for bipartition of
the vertex sets. Those who considered two vertices with the same name C the graph would not
be bipartite as there is a triangle in it.
(b) What is the relation between the sizes of the maximum independent set and maximum matching
of the above graph. In what generalities the relation still holds?
Ans: the maximum independent set: {A, B, E, D} . Hence size is 4. Maxmimum matching are the set
of edges {F, X}, {C, Y } where X and Y are any two distinct vertices from the set {A, B, E, D}. Hence
size is 2. (2 marks)
As we can see the ends of the maximum matchings is the smaller of the two bases of the bipartite
graph, and the maximum independent set is the larger one of the two bases. Hence their sizes sum
up to the total number of vertices of the bipartite graph. This relation holds true in general for any
Bipartite graph. (1 marks)
[3+3 marks]
u6 u7 v6 v7 v9
u1 u2 u3 u4 u5 v1 v2 v3 v4 v5
u8 u9 u10 v8 v10
Solution: An isomorphism must map a vertex of degree d of the first graph to a vertex of degree
d in the second graph. Therefore, the only vertex with degree 3, u4 must be mapped to the only
vertex of degree 3, v3 . An isomorphism must also map adjacent vertices to adjacent vertices.
Subsequently, u5 (adjacent u4 ) must map to a degree 2 vertex adjacent to v3 . But both the
vertices adjacent to v3 (v2 and v4 ) have degree 4. Hence, an isomorphism is impossible. Hence,
there doesn’t exist any isomorphism.
(No marks for guessing the answer without explanation. Alternative answer is ac-
ceptable but handwaving proof will not be counted as an answer)
(b) Find the centres and radius of the following graph.
G F
D
J
I
B
A
K
[3 + 3 marks]
Solution: Ecentricities of the vertices A, I, G, K is clearly 2, the rest of the vertices has ecentricity 3.
Hence, centres are A, I, G, K (2 marks) and radius is 2 (1 marks)
5. (a) Find a Eulerian circuit and a Hamiltonian path and Hamiltonian cycle in the following graph
starting with the vertex 0 a0 .
a c d
b
e
f
i
j h g
i. There doesn’t exist any Eulerian circuit as degree of vertex j. By Euler theorem all vertices
should have even degree.
ii) Hamiltonian paths starting with vertex 0 a0 : a ! j ! h ! g ! d ! e ! f ! i ! b ! c;
a ! j ! h ! g ! d ! c ! b ! e ! f ! i; a ! j ! h ! g ! d ! c ! b ! i ! f ! e
ii) There doesn’t exist any Hamiltonian cycle. (1 + 1+ 1 marks)
(b) Let G be a simple graph on n vertices, and let u, v be two non-adjacent vertices of G with
deg(u) + deg(v) n. If G + uv ( the graph we get by adding edge uv to G) has a Hamiltonian
cycle, then so does G.
Ans: First a clarification: the question was meant to justify or proof the above statement.
Proof: Let C := (x1 = u) ! x2 ! · · · ! (xn = v) ! (x1 = u) be a Hamiltonian cycle in G + uv
which includes the edge uv (otherwise nothing to prove). Since deg(u) + deg(v) n, there are
two consecutive vertices xi 1 and xi in this cycle which are adjacent to v and u (or, u and v)
respectively. Now we can remove the edge of uv and xi 1 xi from C and add edges xi u and xi 1 v to
it. Then, we have a cycle C 0 := (x1 = u) ! x2 ! · · · xi 1 ! (xn 2 = v) ! xn 1 ! · · · ! xi ! u
which is a Hamiltonian cycle in G. The process of construction of C and C 0 is illustrated in the
following figure.
[3 + 3 marks]
6. (a) How many spanning trees are there in a complete graph with n labelled vertices? Sol: nn 2
(0.5
marks).
Draw the labelled tree encoded by the Prüfer sequence [4, 3, 5, 5, 2]. Ans.
4 3 5 7
1 6 2
(2.5 marks). [At least one marks is deducted for an incomplete graph construction even by one
vertex].
(b) Give examples (one for each case) of rooted binary trees of 8 vertices that has the minimum and
maximum possible number of vertices.
i . The minimum number is 2, given by a path. (1.5 marks)
iii. A complete binary tree has the maximum possible number of leaves d n2 e = d 82 e = 4. Example
(1.5 marks):
1
2 3
4 5 6 7