Trees on Data Structure and Algorithms related Questions and Answers

Question 1 : Consider a undirected graph G with vertices { A, B, C, D, E}. In graph G, every edge has distinct weight. Edge CD is edge with minimum weight and edge AB is edge with maximum weight. Then, which of the following is false?
1. Every minimum spanning tree of G must contain CD
2. If AB is in a minimum spanning tree, then its removal must disconnect G
3. No minimum spanning tree contains AB
4. G has a unique minimum spanning tree
View Answer   Discuss with Members

Question 2 : If all the weights of the graph are positive, then the minimum spanning tree of the graph is a minimum cost subgraph.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 4 : Prim's algorithm can be efficiently implemented using _____ for graphs with greater density.
1. d-ary heap
2. linear search
3. fibonacci heap
4. binary search
View Answer   Discuss with Members

Question 5 : Consider a complete graph G with 4 vertices. The graph G has ____ spanning trees.
1. 15
2. 8
3. 16
4. 13
View Answer   Discuss with Members

Question 6 : Worst case is the worst case time complexity of Prim's algorithm if adjacency matrix is used?
1. O(log V)
2. O(V2)
3. O(E2)
4. O(V log E)
View Answer   Discuss with Members

Question 7 : Kruskal's algorithm is best suited for the sparse graphs than the prim's algorithm.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 9 : What is the time complexity of Kruskal's algorithm?
1. O(log V)
2. O(E log V)
3. O(E2)
4. O(V log E)
View Answer   Discuss with Members

Question 10 : Kruskal's algorithm is best suited for the dense graphs than the prim's algorithm.
1. True
2. False
3.
4.
View Answer   Discuss with Members


View 1 - 10 of 93 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter