2. What is the maximal possible number of edges in an undirectedgraph with n vertices. Explain your answer briefly.
Solution
first node can have a maximum of n-1 edges to other nodes.second node can have a maximum of n-2 edges to other nodes….last node can have a maximum of 0 edges to other nodes.total number of edges = 0+1+2+..+(n-2)+(n-1)= n(n-1)/2so, total number of edges in a undirected graph is n(n-1)/2