UGC NET Paper 2 (Computer Science)Moderate
The number of edges in a complete undirected graph with n vertices is:
- A. n(n-1)/2
- B. n(n+1)/2
- C. n^2
- D. n-1
Correct answer: A. n(n-1)/2
Each pair of vertices has one edge, giving C(n,2) = n(n-1)/2.
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
- Belady's anomaly can occur in which page replacement algorithm?
- The recurrence T(n) = 2T(n/2) + n/log n has the solution:
- 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…