Data Structures and Algorithms - Design Techniques

31. The length of the path from v5 to v6 in the MST of previous question with n = 10 is

  • Option : C
  • Explanation :
    Length of path V5 to V6 in mst of n = 10 vertices is

    Path from V5 to V6 contain 8+4+3+6+10 = 31
Cancel reply
Cancel reply

34. Let G be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE?
P: Minimum spanning tree of G does not change
Q: Shortest path between any pair of vertices does not change

  • Option : A
  • Explanation :
    Minimum sparring tree of G does not change, because every edge weight is positive and distinct, so to increase the value of each edge by same constant value it does not change tree.
    Q is false because path may be change. Here path from B to C can. be via A but after increase by 1 path must be from B to C direct.
    Example
Cancel reply
Cancel reply

35. Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 1,2, 3, 4, 5, and 6. The maximum possible weight that a minimum weight spanning tree of G can have is _______.

  • Option : A
  • Explanation :

    Here 3 can’t be taken because it will produce a cycle so take 4.
    This solution is 1 + 2 + 4 = 7
Cancel reply
Cancel reply