4

Find the number of simple labeled graphs on n vertices which have no isolated vertices? Compute the result for n=13

Total number of simple labeled graphs = $2^{n \choose 2}$. How to remove vertices of degree greater than 0 ? Should I directly write a Computer Program enumerating on all vertices?

Amrita
  • 860
  • "Should I write a program enumerating..." That depends what you mean by enumeration. If you just mean counting, then you need a formula - if you mean listing them, you should know that there are at least 318632936830136 such graphs : see https://oeis.org/A110041 – gilleain Sep 03 '16 at 21:41
  • 4
    Using inclusion-exclusion points us to OEIS A006129. The formula is $$\sum_{q=0}^n {n\choose q} (-1)^q 2^{n-q\choose 2}.$$ – Marko Riedel Sep 03 '16 at 22:04
  • So brute force program is not possible. How did you get that formula. In the site you listed there is no formal proof or explanation, just result. Could you kindly elaborate – Amrita Sep 03 '16 at 22:06
  • I just googled Pruefer code and it seems an algorithm is used to convert tree into code, but here we use graphs and how to you connect degree of vertices with the code. Could you kindly elaborate – Amrita Sep 03 '16 at 22:18
  • My apologies, Pruefer codes are for trees and you are searching all labeled graphs, not just trees. Of course there are no isolated vertices in a tree. – Marko Riedel Sep 03 '16 at 22:22
  • So how else could we approach to get that formula. Thanks for introducing me to those codes. – Amrita Sep 03 '16 at 22:31
  • As @MarkoRiedel said, that formula comes from using inclusion-exclusion (see https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle). If you fix $q$ vertices to be isolated, there are $n-q$ vertices remaining, and hence $2^{\binom{n-q}{2}}$ choices for the graph. There are then $\binom{n}{q}$ choices of the $q$ fixed isolated vertices, while the $(-1)^q$ term comes from the inclusion-exclusion formula. – Shagnik Sep 04 '16 at 20:07
  • Okay q varies from 0 to n. So are you doing union of these sets where each set is q isolated vertices. Also since q=3 has graphs common with q=2 we need to subtract and add(From what I understood in that article). Is this right? – Amrita Sep 04 '16 at 23:22

0 Answers0