Question
Which data structure is used in Primās Algorithm to
efficiently find the minimum edge connecting a vertex to the spanning tree?Solution
In Primās Algorithm, a Min-Heap (Priority Queue) is used to efficiently find and extract the minimum-weight edge connecting a vertex to the existing spanning tree. The Min-Heap allows quick updates to edge weights and ensures that the minimum-weight edge can be retrieved in O(logā”V) time, where V is the number of vertices. Steps: ⢠Initialize a Min-Heap with all vertices, starting with an arbitrary vertex having weight 0. ⢠Update the heap when shorter edges are discovered. ⢠Extract the vertex with the minimum edge weight, adding it to the Minimum Spanning Tree (MST). This data structure optimizes the algorithm's overall complexity to O(Elogā”V), making it suitable for dense graphs. Why Other Options Are Incorrect: 1. Binary Search Tree: Inefficient for handling dynamic updates and retrieval of minimum elements. 2. Adjacency List: Represents graph structure but does not facilitate edge selection. 3. Adjacency Matrix: Useful for graph representation but inefficient for edge extraction in MST. 4. Disjoint Set: Used in Kruskalās Algorithm to detect cycles, not for edge selection in Primās Algorithm. Min-Heaps are integral to Primās efficiency in handling dynamic graph traversal during MST construction.
A-5,Ā Ā A,Ā Ā 35,Ā Ā 52,Ā 78,Ā 115
30, 42, 48, 54, 65, 81, 126
- Find the wrong number in the given number series.
25, 34, 18, 34, 9, 46 Find the wrong number in the given number series.
32, 48, 72, 108, 162, 245
Find the wrong number in the given number series.
1600, 800, 1200, 400, 100 , 12.5
547, 594, 640, 691, 741, 792
Find the wrong number in the given number series.
26, 38, 60, 110, 206, 398
75, 450, 225, 1330, 675, 4050
Find the wrong number in the given number series.
8, 12, 23, 40, 66, 103
62, 79, 98, 119, 142, 165