Open In App

GATE | GATE-CS-2002 | Question 25

Like Article
Like
Save
Share
Report

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


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads