Multiple choice

What is the maximum possible number of edges in a graph without self loops and n-nodes?

  1. n2

  2. n(n-1)/2

  3. n

  4. n-1

  5. n(n+1)/2

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

When each node is connected to every other node then it means n nodes are connected to (n-1) nodes. But since the graph is undirected, edges in both the directions mean the same. Hence, the number of edges is divided by 2 to give the result as n(n-1)/2.