Preparing for exam I have a problem with the following exercise:
How many undirected graphs with exactly 10 nodes and 2 edges exist?
My approach:
I need 3 or 4 nodes to draw 2 edges.
So I have
10 choose 3 = 120
And 10 choose 4 = 210
= 330 possibilities?!
Is that correct or did I miss something?
Edit: orphaned nodes are allowed
You are not far.
Case #1: 3 nodes connected togheter. Once you chose the 3 nodes, you have to choose which one is going to be in the middle
case #2: 2 pair of distinct nodes connected. Once you choose the 4 nodes, you still have to choose how they are going to be connected.
A simpler way, though, would be to compute the total number of possible edges: 10 choose 2.
And then, among those possibilities, choose two among them.