UGC NET Paper 2 (Computer Science)Very hard
The recurrence T(n) = 2T(n/2) + n/log n has the solution:
- A. Theta(n)
- B. Theta(n log n)
- C. Theta(n log^2 n)
- D. Theta(n log log n)
Correct answer: D. Theta(n log log n)
The master theorem does not apply (f(n) is only smaller by a log factor); summing n/log(n/2^i) over levels gives n times a harmonic sum, i.e. n log log n.
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
- For T(n) = T(n/2) + T(n/4) + n, the asymptotic solution is:
- The number of structurally distinct binary trees with 5 nodes is:
- The information-theoretic lower bound on the number of comparisons needed to sort 5 distinct elements is:
- 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…
- 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: