Related Articles

Related Articles

GATE | GATE-CS-2002 | Question 25
  • Difficulty Level : Easy
  • Last Updated : 29 Nov, 2014

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

sudo-gate-course

My Personal Notes arrow_drop_up
Recommended Articles
Page :