Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE-CS-2002 | Question 25

  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021

Maximum number of edges in a n – node undirected graph without self loops is
(A) n2
(B) n(n – 1)/2
(C) n – 1
(D) (n + 1) (n)/2


Answer: (B)

Explanation: Background required – Basic Combinatorics

Since the given graph is undirected, that means the order of edges doesn’t matter.

Since we have to insert an edge between all possible pair of vertices, therefore problem reduces to finding the count of the number of subsets of size 2 chosen from the set of vertices.

Since the set of vertices has size n, the number of such subsets is given by the binomial coefficient C(n,2) (also known as “n choose 2”). Using the formula for binomial coefficients, C(n,2) = n(n-1)/2.e

This explanation has been contributed by Pranjul Ahuja.


Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :