0

So I've encountered this one in a problem set and their answer was: $$ n \cdot 2_{\phantom{x}}^{\frac{1}{2}(n-1)(n-2)} $$

They are just getting the total number of graphs of $n-1$ nodes and multiplying it with the number of nodes so one of them at the time is getting the isolated place. Now, I believe, it is clearly wrong since it is counting the same graph multiple times, but I cannot come up with a correct solution.

kabenyuk
  • 10,712
  • 1
    Is this the same as https://math.stackexchange.com/questions/4487712/i-need-help-with-a-graph-theory-exercise-discrete-math ? – Gerry Myerson Jul 09 '22 at 02:14
  • 1
    You are correct. The number of connected labeled graphs is best expressed in terms of generating functions, as in https://mathoverflow.net/a/287766, but one could also write down an inclusion-exclusion formula that captures the same information. – JBL Jul 09 '22 at 15:26
  • 1
    They are incorrect, for the reasons you stated. To get the correct formula, you need to use the principle of inclusion-exclusion. Subtract out the number of graphs with zero specified isolated vertices, for each pair of vertices. Graphs with three vertices are now undercounted, so must be added back in, and so on. The full formula is given here. – Mike Earnest Jul 09 '22 at 16:45

0 Answers0