# Calculating number of connected graphs

I want to calculate the number of connected graphs with n vertices. There is no other constraints like loop etc.

I am unable to think a general method for the same.

Any help appreciated.

[EDIT] I am looking something on lines of a general formula using combinatorics rather than the counting approach.

[EDIT 2] Restating the question: I want to calculate the number of connected graphs with n vertices.

• What do you mean with "no constraints like loop"? Loops are not allowed? Or loops are not excluded? – Hagen von Eitzen Apr 3 '13 at 14:59
• – Cameron Buie Apr 3 '13 at 15:07
• @Hegen As I said "no other constraints like loop" i.e. graphs with loops are to be included. – Aman Deep Gautam Apr 3 '13 at 15:11
• Included?! Then there's an infinite number of non-isomorphic (connected) graphs on 1 vertex: For any $k \geq 0$, add $k$ loops to the vertex. Are you adding a restriction that there's at most one loop on each vertex? Also, are the graphs labelled or unlabelled? The difference between labelled and unlabelled totally changes graphical enumeration questions. May I suggest adding a table of what graphs are counted for $n \in \{1,2,3\}$ to your question? It might be easier to understand what you're asking then. – Douglas S. Stones Apr 3 '13 at 15:45
• @DouglasS.Stones I think what I edited for clarification is creating doubts. Please see the edit. I think it should be clear now what I want to do. – Aman Deep Gautam Apr 3 '13 at 16:32