maximum number of edges in an undirected graph