COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
What is the number of edges present in a complete graph having n vertices?
|
n
|
|
(n*(n+1))/2
|
|
(n*(n-1))/2
|
|
(n*(n-1))
|
Explanation:
Detailed explanation-1: -The maximum number of edges possible in a single graph with ‘n’ vertices is nC2 where nC2 = n(n – 1)/2. The number of simple graphs possible with ‘n’ vertices = 2nc2 = 2n(n-1)/2.
Detailed explanation-2: -A complete graph has the maximum number of edges, which is given by n choose 2 = n*(n-1)/2.
Detailed explanation-3: -For 3 vertices the maximum number of edges is 3; for 4 it is 6; for 5 it is 10 and for 6 it is 15.
There is 1 question to complete.