UGC NET Paper 2 (Computer Science)Hard
Consider. I. Kruskal's algorithm runs in O(E log E) with sorting. II. Prim's algorithm with a binary heap runs in O(E log V). III. Johnson's all-pairs shortest path with Fibonacci heaps runs in O(V^2 log V + VE). Which are correct?
- A. I, II and III
- B. I and II only
- C. II and III only
- D. I and III only
Correct answer: A. I, II and III
All three bounds are standard; Johnson handles negative edges by reweighting using Bellman-Ford.
Practise more UGC NET Computer Science and Applications questionsUGC NET Computer Science and Applications: notes and key points
More UGC NET Computer Science and Applications questions
- Matrices A (10x20), B (20x30), C (30x40) are to be multiplied. The minimum number of scalar multiplications is:
- For symbol frequencies 5, 9, 12, 13, 16, 45 a Huffman code has a total weighted path length (encoded bits) of:
- A full binary tree (each node has 0 or 2 children) has 25 leaves. The total number of nodes is:
- The maximum number of edges in a simple planar graph with 10 vertices is:
- The number of generators of the cyclic group Z12 is:
- The minimum number of states of a DFA over {a, b} accepting strings with the number of a's divisible by 3 and the number of b's divisible…