Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Algorithms Minimum Spanning Trees (MST) Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

ALGORITHMS

MINIMUM SPANNING TREES (MST)

SOLUTIONS
1. In a simple undirected graph with ‘n’ vertices maximum degree for each vertex is

(a) n (b) n – 1
(c) n (n – 1) (d) Infinite

2. In a multigraph with ‘n’ vertices, maximum degree for each vertex is

(a) n (b) n – 1
(c) n (n – 1) (d) Infinite

3. Which of the following is/are True about Simple graphs?

(i) If the degree of each vertex is zero in a graph, then the graph is called Null graph
(ii) A 3-regular graph with 4 vertices in planar
(iii) Number of edges in a 4-regular graph with 5 vertices is 10

(a) only (i) & (ii) (b) only (ii) & (iii)
(c) (i), (ii) & (iii) (d) None

4. Which of the following is True about Spanning Tree?

(i) A spanning tree is a connected graph.


(ii) Number of edges in a spanning tree with n-vertices is n – 1.
(iii) Spanning tree contains cycles.
(iv) Spanning tree has directed edges.

(a) only (i) & (ii) (b) only (i) & (iii)
(c) only (iii) & (iv) (d) only (ii) & (iv)

5. Number of spanning trees for K4 is:

(a) 4 (b) 8
(c) 16 (d) 32

1
6. Number of spanning trees for the following graph is

(a) 5 (b) 6

(c) 8 (d) 9

7. Given a weighted undirected graph. What would be the resultant spanning tree of Kruskal’s
algorithm?

2
8. Given a weighted undirected graph. What would be the resultant spanning tree of Prim’s
Algorithm?

9. Consider the following graph:

3
Which one of the following cannot be the sequence of edges added, in that order, to a minimum
spanning tree using Kruskal’s algorithm?

(a) (a – c), (c– e), (e – f), (e – b), (f – d)


(b) (a – c), (e – f), (e – c), (f – b), (f – d)
(c) (c – e), (a – c), (e – f), (b – d), (f – b)
(d) (c – e), (e – f), (a – c), (f – d), (b – f)

10. Consider the following graph:

Which one of the following cannot be the sequence of edges added in that order, to a minimum
spanning tree using Prim’s algorithm? Assume that the algorithm starts either at vertex b or f.

(a) (b – d), (b – f), (f – e), (c – e), (b – a)


(b) (b – d), (b – a), (b – f), (f – e), (e – c)
(c) (f – e), (f – b), (b – d), (a – b), (e – c)
(d) (f – e), (e – c), (b – d), (b – a ), (b – f)

13. Let G be an undirected connected graph with distinct edge weight. Let emax be the edge with
maximum weight and emin be the edge with minimum weight. Which of the following statement
is/are True?

(i) Every minimum spanning tree at G must contain emin.

4
(ii) G has a unique minimum spanning tree.
(iii) No minimum spanning tree contains emax.
(iv) If emax is in a minimum spanning tree, then its removal leads to a disconnected graph.

(a) only (i), (ii) & (iii) (b) only (i), (ii) & (iv)
(c) only (ii) & (iii) (d) only (ii) & (iv)

11. Best case time complexity of Kruskal’s algorithm is:

(a) Ω (E log v) (b) Ω (v log v)


(c) Ω (E + v log v) (d) Ω (v2)

12.Time complexity of prim’s algorithm using binary min heap

(a) O [v log v] (b) O [(v + E) log v]


(c) O [E log E] (d) O [v2]

14. Let T and T’ be 2-spanning trees of a connected graph G. Suppose that an edge e is in T but
not in T’ and edge e’ in T’ but not in T, and remaining edges are assumed to be same. Then
which of the following is True after performing the following operations?

(i) (T – {e}) ⋃ {e’}


(ii) (T’ – {e’}) ⋃ {e}

(a) Both T and T’ are spanning trees (b) Only T is a spanning tree but not T’
(c) Only T’ is a spanning tree but not T (d) Neither of them are spanning trees

15. Which of the following is / are True about Minimum spanning tree?

(i) For a given graph, more than one MST may be possible.
(ii) For a given graph, if there are more than one MST, then at least one of the edge weight will
be repeated.
(iii) If the given graph is connected and no edge weight is repeated, then exactly one MST is
possible.
(iv) There will be no MST if graph is disconnected.

(a) only (i) & (ii) (b) only (ii) & (iii)
(c) only (i), (ii) & (iii) (d) All

You might also like