The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+24 votes
4.8k views

The maximum number of edges in a n-node undirected graph without self loops is

  1. $n^2$
  2. $\frac{n(n-1)}{2}$
  3. $n-1$
  4. $\frac{(n+1)(n)}{2}$
asked in Graph Theory by Veteran (59.5k points)
edited by | 4.8k views

2 Answers

+31 votes
Best answer
In a graph of $n$ vertices you can draw an edge from a vertex to $\left(n-1\right)$ vertex we will do it for n vertices so total number of edges is $n\left(n-1\right)$ now each edge is counted twice so the required maximum number of edges is $\frac{n\left(n-1\right)}{2}.$
answered by Boss (14.2k points)
edited by
0
But the question disallows only self loops , parallel edges may be present.
+12
I have not considered parallel edge because it will lead to infinity which is not in option
0

The correct answer is ∞, but if we assume that the graph is Simple (i.e self-loop and parallel edges are disallowed) then the ans will be (b) n(n-1)/2 .

+14 votes

For maximum no of edges we must have one edge for each pair of vertices.

We can select a pair out of N nodes in NC2 ways = N(N-1)/2

answered by Veteran (56.9k points)
0
Nice ..
0
@debashish

For directed graph , maximum no of edges would be n^2 -n ??


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

38,017 questions
45,509 answers
131,696 comments
48,739 users