Number of undirected graphs with n vertices and k edges (inclusive of simple, non-simple, isomorphic, and disconnected graphs) Given the constraints (or non-constraints rather), is there a closed solution on a set of labeled vertices?
One way I looked at this problem is by trying to implement a constrained stars-and-bars technique on the diagonal and diagonal-exclusive half of the $n \times n $ adjacency matrix, but I'm not getting any good leads.
It seems there are multiple definitions of a self-loop in undirected graphs. In the context of this question, I define a self-loop to represent a degree of 2 in an undirected graph.

If you consider labeled graphs, there are $n^2$ legitimate spots for an edge (if you allow loops). Since you accept the non-simple graphs (so parallel edges), each of the $k$ edges can be put in any of those spots. In the end, you get $(n^2)^k$ which is equal to
$ n^{2k}$.
