How to calculate the number of possible connected simple graphs with $n$ labelled vertices
$begingroup$
Suppose that we had a set of vertices labelled $1,2,ldots,n$.
There will several ways to connect vertices using edges. Assume that the graph is simple and connected.
In what efficient (or if there is no efficient way, you can just tell me whatever procedure you can think of) way do we be able to calculate the number of possible ways the graph can be made? (even if some graphs are isomorphic to each other, they are counted as separate cases.)
graph-theory
$endgroup$
|
show 1 more comment
$begingroup$
Suppose that we had a set of vertices labelled $1,2,ldots,n$.
There will several ways to connect vertices using edges. Assume that the graph is simple and connected.
In what efficient (or if there is no efficient way, you can just tell me whatever procedure you can think of) way do we be able to calculate the number of possible ways the graph can be made? (even if some graphs are isomorphic to each other, they are counted as separate cases.)
graph-theory
$endgroup$
$begingroup$
I don't understand what "no subgraph of a graph is at least connected to one of other subgraphs".
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:33
$begingroup$
Do you allow loops (edges with the same vertex at both ends)? Do you allow more than one edge between two vertices? Finally, can you explain the parenthetical comment in the second paragraph? It’s not clear as it stands.
$endgroup$
– Brian M. Scott
Jun 7 '12 at 2:34
1
$begingroup$
If you are talking about simple connected graphs, then the sequence is A001349 in the On-line encyclopedia of integer sequences. There is no formula given, but there are references for computing the numbers.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:35
$begingroup$
@ArturoMagidin yes, I am talking about simple connected graphs.
$endgroup$
– Shoeinger Veronica
Jun 7 '12 at 2:40
$begingroup$
@ShoeingerVeronica: That's called a "connected" graph. "Simple" means there are no multiple edges between the same two vertices and no loops. So you are talking about the sequence I refered to; there are citations to articles about how to count the number, presumably as efficiently as is known.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:40
|
show 1 more comment
$begingroup$
Suppose that we had a set of vertices labelled $1,2,ldots,n$.
There will several ways to connect vertices using edges. Assume that the graph is simple and connected.
In what efficient (or if there is no efficient way, you can just tell me whatever procedure you can think of) way do we be able to calculate the number of possible ways the graph can be made? (even if some graphs are isomorphic to each other, they are counted as separate cases.)
graph-theory
$endgroup$
Suppose that we had a set of vertices labelled $1,2,ldots,n$.
There will several ways to connect vertices using edges. Assume that the graph is simple and connected.
In what efficient (or if there is no efficient way, you can just tell me whatever procedure you can think of) way do we be able to calculate the number of possible ways the graph can be made? (even if some graphs are isomorphic to each other, they are counted as separate cases.)
graph-theory
graph-theory
edited May 5 '13 at 5:28
Marc van Leeuwen
86.8k5107222
86.8k5107222
asked Jun 7 '12 at 2:30
Shoeinger VeronicaShoeinger Veronica
128114
128114
$begingroup$
I don't understand what "no subgraph of a graph is at least connected to one of other subgraphs".
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:33
$begingroup$
Do you allow loops (edges with the same vertex at both ends)? Do you allow more than one edge between two vertices? Finally, can you explain the parenthetical comment in the second paragraph? It’s not clear as it stands.
$endgroup$
– Brian M. Scott
Jun 7 '12 at 2:34
1
$begingroup$
If you are talking about simple connected graphs, then the sequence is A001349 in the On-line encyclopedia of integer sequences. There is no formula given, but there are references for computing the numbers.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:35
$begingroup$
@ArturoMagidin yes, I am talking about simple connected graphs.
$endgroup$
– Shoeinger Veronica
Jun 7 '12 at 2:40
$begingroup$
@ShoeingerVeronica: That's called a "connected" graph. "Simple" means there are no multiple edges between the same two vertices and no loops. So you are talking about the sequence I refered to; there are citations to articles about how to count the number, presumably as efficiently as is known.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:40
|
show 1 more comment
$begingroup$
I don't understand what "no subgraph of a graph is at least connected to one of other subgraphs".
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:33
$begingroup$
Do you allow loops (edges with the same vertex at both ends)? Do you allow more than one edge between two vertices? Finally, can you explain the parenthetical comment in the second paragraph? It’s not clear as it stands.
$endgroup$
– Brian M. Scott
Jun 7 '12 at 2:34
1
$begingroup$
If you are talking about simple connected graphs, then the sequence is A001349 in the On-line encyclopedia of integer sequences. There is no formula given, but there are references for computing the numbers.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:35
$begingroup$
@ArturoMagidin yes, I am talking about simple connected graphs.
$endgroup$
– Shoeinger Veronica
Jun 7 '12 at 2:40
$begingroup$
@ShoeingerVeronica: That's called a "connected" graph. "Simple" means there are no multiple edges between the same two vertices and no loops. So you are talking about the sequence I refered to; there are citations to articles about how to count the number, presumably as efficiently as is known.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:40
$begingroup$
I don't understand what "no subgraph of a graph is at least connected to one of other subgraphs".
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:33
$begingroup$
I don't understand what "no subgraph of a graph is at least connected to one of other subgraphs".
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:33
$begingroup$
Do you allow loops (edges with the same vertex at both ends)? Do you allow more than one edge between two vertices? Finally, can you explain the parenthetical comment in the second paragraph? It’s not clear as it stands.
$endgroup$
– Brian M. Scott
Jun 7 '12 at 2:34
$begingroup$
Do you allow loops (edges with the same vertex at both ends)? Do you allow more than one edge between two vertices? Finally, can you explain the parenthetical comment in the second paragraph? It’s not clear as it stands.
$endgroup$
– Brian M. Scott
Jun 7 '12 at 2:34
1
1
$begingroup$
If you are talking about simple connected graphs, then the sequence is A001349 in the On-line encyclopedia of integer sequences. There is no formula given, but there are references for computing the numbers.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:35
$begingroup$
If you are talking about simple connected graphs, then the sequence is A001349 in the On-line encyclopedia of integer sequences. There is no formula given, but there are references for computing the numbers.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:35
$begingroup$
@ArturoMagidin yes, I am talking about simple connected graphs.
$endgroup$
– Shoeinger Veronica
Jun 7 '12 at 2:40
$begingroup$
@ArturoMagidin yes, I am talking about simple connected graphs.
$endgroup$
– Shoeinger Veronica
Jun 7 '12 at 2:40
$begingroup$
@ShoeingerVeronica: That's called a "connected" graph. "Simple" means there are no multiple edges between the same two vertices and no loops. So you are talking about the sequence I refered to; there are citations to articles about how to count the number, presumably as efficiently as is known.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:40
$begingroup$
@ShoeingerVeronica: That's called a "connected" graph. "Simple" means there are no multiple edges between the same two vertices and no loops. So you are talking about the sequence I refered to; there are citations to articles about how to count the number, presumably as efficiently as is known.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:40
|
show 1 more comment
6 Answers
6
active
oldest
votes
$begingroup$
There are $binom{n}2=frac12n(n-1)$ pairs of distinct points. If you do not allow loops or multiple edges, each of these pairs determines one possible edge, and you can have any subset of those possible edges. A set with $binom{n}2$ members has $2^{binom{n}2}$ subsets, so there are $2^{binom{n}2}$ possible graphs without loops or multiple edges.
If you demand that the graphs be connected, the problem becomes very much harder. From your final comment I take it that you are in effect counting labelled graphs. This sequence of numbers is A001187 in the On-Line Encyclopedia of Integer Sequences. If $d_n$ is the number of labelled, connected, simple graphs on $n$ vertices, the numbers $d_n$ satisfy the recurrence
$$sum_kbinom{n}kkd_k2^{binom{n-k}2}=n2^binom{n}2;,$$
from which it’s possible to calculate $d_n$ for small values of $n$. This recurrence is derived as formula (3.10.2) in Herbert S. Wilf, generatingfunctionology, 2nd edition, which is available for free download here.
According to MathWorld, Brendan McKay’s software package nauty includes a routine that efficiently enumerates such graphs; it’s available here.
If you count unlabelled graphs instead, so that you don’t count isomorphic graphs separately, you get the sequence mentioned by Arturo in the comments.
$endgroup$
$begingroup$
There is a mistake in the right hand side
$endgroup$
– Sergio A. Yuhjtman
Oct 22 '15 at 15:00
$begingroup$
@Sergio: There is indeed; thanks very much. Fixed now.
$endgroup$
– Brian M. Scott
Oct 22 '15 at 18:11
$begingroup$
@BrianM.Scott Could you have a look at my question : math.stackexchange.com/questions/1779312/….
$endgroup$
– sashas
May 10 '16 at 10:47
add a comment |
$begingroup$
You can use exponential generating functions for this. The exponential generating functions $C(x)$ for connected labeled graphs and $D(x)$ for all labeled graphs are related by
$$D(x)=mathrm e^{C(x)-1};,$$
which you can show using the decomposition of a labeled graph into its connected components.
As others have noted, we have
$$
D(x)=sum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n;,
$$
so
$$
begin{align}
C(x)
&=
1+logsum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n
\
&=
1+logleft(1+x+frac2{2!}x^2+frac8{3!}x^3+frac{64}{4!}x^4+dotsoright)
\
&=
1+x+frac1{2!}x^2+frac4{3!}x^3+frac{38}{4!}x^4+dotso
;.
end{align}
$$
Thus there are $1,1,1,4,38,dotsc$ different connected graphs on $0,1,2,3,4,dotsc$ labeled vertices.
$endgroup$
add a comment |
$begingroup$
As I indicated in the comment, this is sequence A001349 in the On-Line Encyclopedia of Integer Sequences. There is no closed formula listed, but there are a couple of references to computer calculations and algorithms. I suggest that's the place where you want to start.
$endgroup$
add a comment |
$begingroup$
We can also reduce the problem of counting the number of labeled simple graphs on $n$ vertices to enumerating partitions of $n$. Our main strategy is to use Mobius inversion on the partition lattice.
Let $G=(V,E)$ be a graph on $n$ vertices. For any subgraph $G'=(V,E')$, where $E'subseteq E$, we denote $C_{G'}$ to be the partition of vertices corresponding to the connected components of $G'$. We now define $g: Pi_n to mathbb{Z}$ and $f: Pi_n to mathbb{Z}$ as follows. Let $g(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}=B$, and let $f(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}le B$. Then
$$ f(B)= sum_{Ale B} g(A) $$
We call a partition of $n$ to be type $(k_1,k_2,dots,k_n)$ if the partition contains $k_i$ blocks of size $i$. Now if $Bin Pi_n$ has type $(k_1,k_2,dots,k_n)$, then
$$ f(B)= 2^{sum_{i=2}^n kdbinom{i}{2}}$$
By Mobius Inversion, we have
$$ g(widehat{1})=sum_{Ale B}mu_{Pi_n}(A,widehat{1})f(A)$$
Let $sum_{i=1}^n k_i=k$. Then $|A|=k$, and $[A,widehat{1}]cong Pi_k$. Hence $$mu_{Pi_n}(A,widehat{1})=mu_{Pi_k}(widehat{0},widehat{1})=(-1)^{k-1}(k-1)!$$ Note that there are
$$ frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}$$
partitions of $n$ of type $(k_1,k_2,dots,k_n)$. Thus the number of labeled simple graphs on $n$ vertices is
$$ g(widehat{1})=sum_{substack{(k_1,k_2,dots,k_n) \ sum_{i=1}^n ik_i=n}} left[2^{sum_{i=2}^n kdbinom{i}{2}}right]left[(-1)^{-1+sum_{i=1}^n k_i}right]left(-1+sum_{i=1}^n k_iright)!left(frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}right) $$
$endgroup$
add a comment |
$begingroup$
Let $W_n$ be the set of connected graphs with vertex labels from $1, …, n$.
$|W_n| = sum_{b = 1}^{n-1}(2^{b} - 1) {n-2choose b-1}|W_{b}||W_{n-b}|$
Proof:
First, for any labeled graph, define $C(k)$ to be the component of vertex $k$ in that graph.
Now let $W_{n,S} subset W_n$ denote the subset of connected graphs on $n$ labeled vertices, such that when vertex $n$ is removed, the $C(1)$ has vertex set $S$.
When varied over choices of $S$, $W_{n,S}$ partitions $W_n$, so $|W_n| = sum_{S subset {1...,n-1}, 1 in S }|W_{n,S}|$
Suppose $|S| = b$. Since $S$ must include vertex $1$ and cannot include vertex $n$, there are ${n-2 choose b-1}$ possible values for $S$. Then there are $|W_b|$ ways to make a connected component out of those vertices in $S$, and $2^b -1 $ ways vertex $n$ can connect to that component (every possible subset of edges except the emtpy subset). And then there are $|W_{n-b}|$ ways the rest of the graph could look like.
$endgroup$
add a comment |
$begingroup$
IF it is a simple, connected graph, then for the set of vertices {v: v exists in V}, v is adjacent to every other vertex in V. This type of graph is denoted Kn. For Kn, there will be n vertices and (n(n-1))/2 edges.
To determine how many subsets of edges a Kn graph will produce, consider the powerset as Brian M. Scott stated in a previous comment. If S is a finite set with n elements, then the powerset of S will have 2^n elements where n is the number of elements in the set S.
Assuming that the n in Kn is any non-negative integer, then shouldn't the set be considered countably infinite? If so, this would make the cardinality of the powerset Alepha 0.
$endgroup$
$begingroup$
Please use the right math formatting, see e.g. here.
$endgroup$
– Keep these mind
Apr 8 '13 at 8:07
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f154941%2fhow-to-calculate-the-number-of-possible-connected-simple-graphs-with-n-labelle%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
There are $binom{n}2=frac12n(n-1)$ pairs of distinct points. If you do not allow loops or multiple edges, each of these pairs determines one possible edge, and you can have any subset of those possible edges. A set with $binom{n}2$ members has $2^{binom{n}2}$ subsets, so there are $2^{binom{n}2}$ possible graphs without loops or multiple edges.
If you demand that the graphs be connected, the problem becomes very much harder. From your final comment I take it that you are in effect counting labelled graphs. This sequence of numbers is A001187 in the On-Line Encyclopedia of Integer Sequences. If $d_n$ is the number of labelled, connected, simple graphs on $n$ vertices, the numbers $d_n$ satisfy the recurrence
$$sum_kbinom{n}kkd_k2^{binom{n-k}2}=n2^binom{n}2;,$$
from which it’s possible to calculate $d_n$ for small values of $n$. This recurrence is derived as formula (3.10.2) in Herbert S. Wilf, generatingfunctionology, 2nd edition, which is available for free download here.
According to MathWorld, Brendan McKay’s software package nauty includes a routine that efficiently enumerates such graphs; it’s available here.
If you count unlabelled graphs instead, so that you don’t count isomorphic graphs separately, you get the sequence mentioned by Arturo in the comments.
$endgroup$
$begingroup$
There is a mistake in the right hand side
$endgroup$
– Sergio A. Yuhjtman
Oct 22 '15 at 15:00
$begingroup$
@Sergio: There is indeed; thanks very much. Fixed now.
$endgroup$
– Brian M. Scott
Oct 22 '15 at 18:11
$begingroup$
@BrianM.Scott Could you have a look at my question : math.stackexchange.com/questions/1779312/….
$endgroup$
– sashas
May 10 '16 at 10:47
add a comment |
$begingroup$
There are $binom{n}2=frac12n(n-1)$ pairs of distinct points. If you do not allow loops or multiple edges, each of these pairs determines one possible edge, and you can have any subset of those possible edges. A set with $binom{n}2$ members has $2^{binom{n}2}$ subsets, so there are $2^{binom{n}2}$ possible graphs without loops or multiple edges.
If you demand that the graphs be connected, the problem becomes very much harder. From your final comment I take it that you are in effect counting labelled graphs. This sequence of numbers is A001187 in the On-Line Encyclopedia of Integer Sequences. If $d_n$ is the number of labelled, connected, simple graphs on $n$ vertices, the numbers $d_n$ satisfy the recurrence
$$sum_kbinom{n}kkd_k2^{binom{n-k}2}=n2^binom{n}2;,$$
from which it’s possible to calculate $d_n$ for small values of $n$. This recurrence is derived as formula (3.10.2) in Herbert S. Wilf, generatingfunctionology, 2nd edition, which is available for free download here.
According to MathWorld, Brendan McKay’s software package nauty includes a routine that efficiently enumerates such graphs; it’s available here.
If you count unlabelled graphs instead, so that you don’t count isomorphic graphs separately, you get the sequence mentioned by Arturo in the comments.
$endgroup$
$begingroup$
There is a mistake in the right hand side
$endgroup$
– Sergio A. Yuhjtman
Oct 22 '15 at 15:00
$begingroup$
@Sergio: There is indeed; thanks very much. Fixed now.
$endgroup$
– Brian M. Scott
Oct 22 '15 at 18:11
$begingroup$
@BrianM.Scott Could you have a look at my question : math.stackexchange.com/questions/1779312/….
$endgroup$
– sashas
May 10 '16 at 10:47
add a comment |
$begingroup$
There are $binom{n}2=frac12n(n-1)$ pairs of distinct points. If you do not allow loops or multiple edges, each of these pairs determines one possible edge, and you can have any subset of those possible edges. A set with $binom{n}2$ members has $2^{binom{n}2}$ subsets, so there are $2^{binom{n}2}$ possible graphs without loops or multiple edges.
If you demand that the graphs be connected, the problem becomes very much harder. From your final comment I take it that you are in effect counting labelled graphs. This sequence of numbers is A001187 in the On-Line Encyclopedia of Integer Sequences. If $d_n$ is the number of labelled, connected, simple graphs on $n$ vertices, the numbers $d_n$ satisfy the recurrence
$$sum_kbinom{n}kkd_k2^{binom{n-k}2}=n2^binom{n}2;,$$
from which it’s possible to calculate $d_n$ for small values of $n$. This recurrence is derived as formula (3.10.2) in Herbert S. Wilf, generatingfunctionology, 2nd edition, which is available for free download here.
According to MathWorld, Brendan McKay’s software package nauty includes a routine that efficiently enumerates such graphs; it’s available here.
If you count unlabelled graphs instead, so that you don’t count isomorphic graphs separately, you get the sequence mentioned by Arturo in the comments.
$endgroup$
There are $binom{n}2=frac12n(n-1)$ pairs of distinct points. If you do not allow loops or multiple edges, each of these pairs determines one possible edge, and you can have any subset of those possible edges. A set with $binom{n}2$ members has $2^{binom{n}2}$ subsets, so there are $2^{binom{n}2}$ possible graphs without loops or multiple edges.
If you demand that the graphs be connected, the problem becomes very much harder. From your final comment I take it that you are in effect counting labelled graphs. This sequence of numbers is A001187 in the On-Line Encyclopedia of Integer Sequences. If $d_n$ is the number of labelled, connected, simple graphs on $n$ vertices, the numbers $d_n$ satisfy the recurrence
$$sum_kbinom{n}kkd_k2^{binom{n-k}2}=n2^binom{n}2;,$$
from which it’s possible to calculate $d_n$ for small values of $n$. This recurrence is derived as formula (3.10.2) in Herbert S. Wilf, generatingfunctionology, 2nd edition, which is available for free download here.
According to MathWorld, Brendan McKay’s software package nauty includes a routine that efficiently enumerates such graphs; it’s available here.
If you count unlabelled graphs instead, so that you don’t count isomorphic graphs separately, you get the sequence mentioned by Arturo in the comments.
edited Oct 22 '15 at 18:10
answered Jun 7 '12 at 2:54
Brian M. ScottBrian M. Scott
456k38507908
456k38507908
$begingroup$
There is a mistake in the right hand side
$endgroup$
– Sergio A. Yuhjtman
Oct 22 '15 at 15:00
$begingroup$
@Sergio: There is indeed; thanks very much. Fixed now.
$endgroup$
– Brian M. Scott
Oct 22 '15 at 18:11
$begingroup$
@BrianM.Scott Could you have a look at my question : math.stackexchange.com/questions/1779312/….
$endgroup$
– sashas
May 10 '16 at 10:47
add a comment |
$begingroup$
There is a mistake in the right hand side
$endgroup$
– Sergio A. Yuhjtman
Oct 22 '15 at 15:00
$begingroup$
@Sergio: There is indeed; thanks very much. Fixed now.
$endgroup$
– Brian M. Scott
Oct 22 '15 at 18:11
$begingroup$
@BrianM.Scott Could you have a look at my question : math.stackexchange.com/questions/1779312/….
$endgroup$
– sashas
May 10 '16 at 10:47
$begingroup$
There is a mistake in the right hand side
$endgroup$
– Sergio A. Yuhjtman
Oct 22 '15 at 15:00
$begingroup$
There is a mistake in the right hand side
$endgroup$
– Sergio A. Yuhjtman
Oct 22 '15 at 15:00
$begingroup$
@Sergio: There is indeed; thanks very much. Fixed now.
$endgroup$
– Brian M. Scott
Oct 22 '15 at 18:11
$begingroup$
@Sergio: There is indeed; thanks very much. Fixed now.
$endgroup$
– Brian M. Scott
Oct 22 '15 at 18:11
$begingroup$
@BrianM.Scott Could you have a look at my question : math.stackexchange.com/questions/1779312/….
$endgroup$
– sashas
May 10 '16 at 10:47
$begingroup$
@BrianM.Scott Could you have a look at my question : math.stackexchange.com/questions/1779312/….
$endgroup$
– sashas
May 10 '16 at 10:47
add a comment |
$begingroup$
You can use exponential generating functions for this. The exponential generating functions $C(x)$ for connected labeled graphs and $D(x)$ for all labeled graphs are related by
$$D(x)=mathrm e^{C(x)-1};,$$
which you can show using the decomposition of a labeled graph into its connected components.
As others have noted, we have
$$
D(x)=sum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n;,
$$
so
$$
begin{align}
C(x)
&=
1+logsum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n
\
&=
1+logleft(1+x+frac2{2!}x^2+frac8{3!}x^3+frac{64}{4!}x^4+dotsoright)
\
&=
1+x+frac1{2!}x^2+frac4{3!}x^3+frac{38}{4!}x^4+dotso
;.
end{align}
$$
Thus there are $1,1,1,4,38,dotsc$ different connected graphs on $0,1,2,3,4,dotsc$ labeled vertices.
$endgroup$
add a comment |
$begingroup$
You can use exponential generating functions for this. The exponential generating functions $C(x)$ for connected labeled graphs and $D(x)$ for all labeled graphs are related by
$$D(x)=mathrm e^{C(x)-1};,$$
which you can show using the decomposition of a labeled graph into its connected components.
As others have noted, we have
$$
D(x)=sum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n;,
$$
so
$$
begin{align}
C(x)
&=
1+logsum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n
\
&=
1+logleft(1+x+frac2{2!}x^2+frac8{3!}x^3+frac{64}{4!}x^4+dotsoright)
\
&=
1+x+frac1{2!}x^2+frac4{3!}x^3+frac{38}{4!}x^4+dotso
;.
end{align}
$$
Thus there are $1,1,1,4,38,dotsc$ different connected graphs on $0,1,2,3,4,dotsc$ labeled vertices.
$endgroup$
add a comment |
$begingroup$
You can use exponential generating functions for this. The exponential generating functions $C(x)$ for connected labeled graphs and $D(x)$ for all labeled graphs are related by
$$D(x)=mathrm e^{C(x)-1};,$$
which you can show using the decomposition of a labeled graph into its connected components.
As others have noted, we have
$$
D(x)=sum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n;,
$$
so
$$
begin{align}
C(x)
&=
1+logsum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n
\
&=
1+logleft(1+x+frac2{2!}x^2+frac8{3!}x^3+frac{64}{4!}x^4+dotsoright)
\
&=
1+x+frac1{2!}x^2+frac4{3!}x^3+frac{38}{4!}x^4+dotso
;.
end{align}
$$
Thus there are $1,1,1,4,38,dotsc$ different connected graphs on $0,1,2,3,4,dotsc$ labeled vertices.
$endgroup$
You can use exponential generating functions for this. The exponential generating functions $C(x)$ for connected labeled graphs and $D(x)$ for all labeled graphs are related by
$$D(x)=mathrm e^{C(x)-1};,$$
which you can show using the decomposition of a labeled graph into its connected components.
As others have noted, we have
$$
D(x)=sum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n;,
$$
so
$$
begin{align}
C(x)
&=
1+logsum_{n=0}^inftyfrac{2^{n(n-1)/2}}{n!}x^n
\
&=
1+logleft(1+x+frac2{2!}x^2+frac8{3!}x^3+frac{64}{4!}x^4+dotsoright)
\
&=
1+x+frac1{2!}x^2+frac4{3!}x^3+frac{38}{4!}x^4+dotso
;.
end{align}
$$
Thus there are $1,1,1,4,38,dotsc$ different connected graphs on $0,1,2,3,4,dotsc$ labeled vertices.
answered May 5 '13 at 4:56
jorikijoriki
170k10183343
170k10183343
add a comment |
add a comment |
$begingroup$
As I indicated in the comment, this is sequence A001349 in the On-Line Encyclopedia of Integer Sequences. There is no closed formula listed, but there are a couple of references to computer calculations and algorithms. I suggest that's the place where you want to start.
$endgroup$
add a comment |
$begingroup$
As I indicated in the comment, this is sequence A001349 in the On-Line Encyclopedia of Integer Sequences. There is no closed formula listed, but there are a couple of references to computer calculations and algorithms. I suggest that's the place where you want to start.
$endgroup$
add a comment |
$begingroup$
As I indicated in the comment, this is sequence A001349 in the On-Line Encyclopedia of Integer Sequences. There is no closed formula listed, but there are a couple of references to computer calculations and algorithms. I suggest that's the place where you want to start.
$endgroup$
As I indicated in the comment, this is sequence A001349 in the On-Line Encyclopedia of Integer Sequences. There is no closed formula listed, but there are a couple of references to computer calculations and algorithms. I suggest that's the place where you want to start.
answered Jun 7 '12 at 2:45
community wiki
Arturo Magidin
add a comment |
add a comment |
$begingroup$
We can also reduce the problem of counting the number of labeled simple graphs on $n$ vertices to enumerating partitions of $n$. Our main strategy is to use Mobius inversion on the partition lattice.
Let $G=(V,E)$ be a graph on $n$ vertices. For any subgraph $G'=(V,E')$, where $E'subseteq E$, we denote $C_{G'}$ to be the partition of vertices corresponding to the connected components of $G'$. We now define $g: Pi_n to mathbb{Z}$ and $f: Pi_n to mathbb{Z}$ as follows. Let $g(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}=B$, and let $f(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}le B$. Then
$$ f(B)= sum_{Ale B} g(A) $$
We call a partition of $n$ to be type $(k_1,k_2,dots,k_n)$ if the partition contains $k_i$ blocks of size $i$. Now if $Bin Pi_n$ has type $(k_1,k_2,dots,k_n)$, then
$$ f(B)= 2^{sum_{i=2}^n kdbinom{i}{2}}$$
By Mobius Inversion, we have
$$ g(widehat{1})=sum_{Ale B}mu_{Pi_n}(A,widehat{1})f(A)$$
Let $sum_{i=1}^n k_i=k$. Then $|A|=k$, and $[A,widehat{1}]cong Pi_k$. Hence $$mu_{Pi_n}(A,widehat{1})=mu_{Pi_k}(widehat{0},widehat{1})=(-1)^{k-1}(k-1)!$$ Note that there are
$$ frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}$$
partitions of $n$ of type $(k_1,k_2,dots,k_n)$. Thus the number of labeled simple graphs on $n$ vertices is
$$ g(widehat{1})=sum_{substack{(k_1,k_2,dots,k_n) \ sum_{i=1}^n ik_i=n}} left[2^{sum_{i=2}^n kdbinom{i}{2}}right]left[(-1)^{-1+sum_{i=1}^n k_i}right]left(-1+sum_{i=1}^n k_iright)!left(frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}right) $$
$endgroup$
add a comment |
$begingroup$
We can also reduce the problem of counting the number of labeled simple graphs on $n$ vertices to enumerating partitions of $n$. Our main strategy is to use Mobius inversion on the partition lattice.
Let $G=(V,E)$ be a graph on $n$ vertices. For any subgraph $G'=(V,E')$, where $E'subseteq E$, we denote $C_{G'}$ to be the partition of vertices corresponding to the connected components of $G'$. We now define $g: Pi_n to mathbb{Z}$ and $f: Pi_n to mathbb{Z}$ as follows. Let $g(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}=B$, and let $f(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}le B$. Then
$$ f(B)= sum_{Ale B} g(A) $$
We call a partition of $n$ to be type $(k_1,k_2,dots,k_n)$ if the partition contains $k_i$ blocks of size $i$. Now if $Bin Pi_n$ has type $(k_1,k_2,dots,k_n)$, then
$$ f(B)= 2^{sum_{i=2}^n kdbinom{i}{2}}$$
By Mobius Inversion, we have
$$ g(widehat{1})=sum_{Ale B}mu_{Pi_n}(A,widehat{1})f(A)$$
Let $sum_{i=1}^n k_i=k$. Then $|A|=k$, and $[A,widehat{1}]cong Pi_k$. Hence $$mu_{Pi_n}(A,widehat{1})=mu_{Pi_k}(widehat{0},widehat{1})=(-1)^{k-1}(k-1)!$$ Note that there are
$$ frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}$$
partitions of $n$ of type $(k_1,k_2,dots,k_n)$. Thus the number of labeled simple graphs on $n$ vertices is
$$ g(widehat{1})=sum_{substack{(k_1,k_2,dots,k_n) \ sum_{i=1}^n ik_i=n}} left[2^{sum_{i=2}^n kdbinom{i}{2}}right]left[(-1)^{-1+sum_{i=1}^n k_i}right]left(-1+sum_{i=1}^n k_iright)!left(frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}right) $$
$endgroup$
add a comment |
$begingroup$
We can also reduce the problem of counting the number of labeled simple graphs on $n$ vertices to enumerating partitions of $n$. Our main strategy is to use Mobius inversion on the partition lattice.
Let $G=(V,E)$ be a graph on $n$ vertices. For any subgraph $G'=(V,E')$, where $E'subseteq E$, we denote $C_{G'}$ to be the partition of vertices corresponding to the connected components of $G'$. We now define $g: Pi_n to mathbb{Z}$ and $f: Pi_n to mathbb{Z}$ as follows. Let $g(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}=B$, and let $f(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}le B$. Then
$$ f(B)= sum_{Ale B} g(A) $$
We call a partition of $n$ to be type $(k_1,k_2,dots,k_n)$ if the partition contains $k_i$ blocks of size $i$. Now if $Bin Pi_n$ has type $(k_1,k_2,dots,k_n)$, then
$$ f(B)= 2^{sum_{i=2}^n kdbinom{i}{2}}$$
By Mobius Inversion, we have
$$ g(widehat{1})=sum_{Ale B}mu_{Pi_n}(A,widehat{1})f(A)$$
Let $sum_{i=1}^n k_i=k$. Then $|A|=k$, and $[A,widehat{1}]cong Pi_k$. Hence $$mu_{Pi_n}(A,widehat{1})=mu_{Pi_k}(widehat{0},widehat{1})=(-1)^{k-1}(k-1)!$$ Note that there are
$$ frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}$$
partitions of $n$ of type $(k_1,k_2,dots,k_n)$. Thus the number of labeled simple graphs on $n$ vertices is
$$ g(widehat{1})=sum_{substack{(k_1,k_2,dots,k_n) \ sum_{i=1}^n ik_i=n}} left[2^{sum_{i=2}^n kdbinom{i}{2}}right]left[(-1)^{-1+sum_{i=1}^n k_i}right]left(-1+sum_{i=1}^n k_iright)!left(frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}right) $$
$endgroup$
We can also reduce the problem of counting the number of labeled simple graphs on $n$ vertices to enumerating partitions of $n$. Our main strategy is to use Mobius inversion on the partition lattice.
Let $G=(V,E)$ be a graph on $n$ vertices. For any subgraph $G'=(V,E')$, where $E'subseteq E$, we denote $C_{G'}$ to be the partition of vertices corresponding to the connected components of $G'$. We now define $g: Pi_n to mathbb{Z}$ and $f: Pi_n to mathbb{Z}$ as follows. Let $g(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}=B$, and let $f(B)$ be the number of simple subgraphs $G'=(V,E')$ such that $C_{G'}le B$. Then
$$ f(B)= sum_{Ale B} g(A) $$
We call a partition of $n$ to be type $(k_1,k_2,dots,k_n)$ if the partition contains $k_i$ blocks of size $i$. Now if $Bin Pi_n$ has type $(k_1,k_2,dots,k_n)$, then
$$ f(B)= 2^{sum_{i=2}^n kdbinom{i}{2}}$$
By Mobius Inversion, we have
$$ g(widehat{1})=sum_{Ale B}mu_{Pi_n}(A,widehat{1})f(A)$$
Let $sum_{i=1}^n k_i=k$. Then $|A|=k$, and $[A,widehat{1}]cong Pi_k$. Hence $$mu_{Pi_n}(A,widehat{1})=mu_{Pi_k}(widehat{0},widehat{1})=(-1)^{k-1}(k-1)!$$ Note that there are
$$ frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}$$
partitions of $n$ of type $(k_1,k_2,dots,k_n)$. Thus the number of labeled simple graphs on $n$ vertices is
$$ g(widehat{1})=sum_{substack{(k_1,k_2,dots,k_n) \ sum_{i=1}^n ik_i=n}} left[2^{sum_{i=2}^n kdbinom{i}{2}}right]left[(-1)^{-1+sum_{i=1}^n k_i}right]left(-1+sum_{i=1}^n k_iright)!left(frac{n!}{prod_{i=1}^n k_i!i!^{k_i}}right) $$
answered May 15 '16 at 16:14
OrangeApple3OrangeApple3
494214
494214
add a comment |
add a comment |
$begingroup$
Let $W_n$ be the set of connected graphs with vertex labels from $1, …, n$.
$|W_n| = sum_{b = 1}^{n-1}(2^{b} - 1) {n-2choose b-1}|W_{b}||W_{n-b}|$
Proof:
First, for any labeled graph, define $C(k)$ to be the component of vertex $k$ in that graph.
Now let $W_{n,S} subset W_n$ denote the subset of connected graphs on $n$ labeled vertices, such that when vertex $n$ is removed, the $C(1)$ has vertex set $S$.
When varied over choices of $S$, $W_{n,S}$ partitions $W_n$, so $|W_n| = sum_{S subset {1...,n-1}, 1 in S }|W_{n,S}|$
Suppose $|S| = b$. Since $S$ must include vertex $1$ and cannot include vertex $n$, there are ${n-2 choose b-1}$ possible values for $S$. Then there are $|W_b|$ ways to make a connected component out of those vertices in $S$, and $2^b -1 $ ways vertex $n$ can connect to that component (every possible subset of edges except the emtpy subset). And then there are $|W_{n-b}|$ ways the rest of the graph could look like.
$endgroup$
add a comment |
$begingroup$
Let $W_n$ be the set of connected graphs with vertex labels from $1, …, n$.
$|W_n| = sum_{b = 1}^{n-1}(2^{b} - 1) {n-2choose b-1}|W_{b}||W_{n-b}|$
Proof:
First, for any labeled graph, define $C(k)$ to be the component of vertex $k$ in that graph.
Now let $W_{n,S} subset W_n$ denote the subset of connected graphs on $n$ labeled vertices, such that when vertex $n$ is removed, the $C(1)$ has vertex set $S$.
When varied over choices of $S$, $W_{n,S}$ partitions $W_n$, so $|W_n| = sum_{S subset {1...,n-1}, 1 in S }|W_{n,S}|$
Suppose $|S| = b$. Since $S$ must include vertex $1$ and cannot include vertex $n$, there are ${n-2 choose b-1}$ possible values for $S$. Then there are $|W_b|$ ways to make a connected component out of those vertices in $S$, and $2^b -1 $ ways vertex $n$ can connect to that component (every possible subset of edges except the emtpy subset). And then there are $|W_{n-b}|$ ways the rest of the graph could look like.
$endgroup$
add a comment |
$begingroup$
Let $W_n$ be the set of connected graphs with vertex labels from $1, …, n$.
$|W_n| = sum_{b = 1}^{n-1}(2^{b} - 1) {n-2choose b-1}|W_{b}||W_{n-b}|$
Proof:
First, for any labeled graph, define $C(k)$ to be the component of vertex $k$ in that graph.
Now let $W_{n,S} subset W_n$ denote the subset of connected graphs on $n$ labeled vertices, such that when vertex $n$ is removed, the $C(1)$ has vertex set $S$.
When varied over choices of $S$, $W_{n,S}$ partitions $W_n$, so $|W_n| = sum_{S subset {1...,n-1}, 1 in S }|W_{n,S}|$
Suppose $|S| = b$. Since $S$ must include vertex $1$ and cannot include vertex $n$, there are ${n-2 choose b-1}$ possible values for $S$. Then there are $|W_b|$ ways to make a connected component out of those vertices in $S$, and $2^b -1 $ ways vertex $n$ can connect to that component (every possible subset of edges except the emtpy subset). And then there are $|W_{n-b}|$ ways the rest of the graph could look like.
$endgroup$
Let $W_n$ be the set of connected graphs with vertex labels from $1, …, n$.
$|W_n| = sum_{b = 1}^{n-1}(2^{b} - 1) {n-2choose b-1}|W_{b}||W_{n-b}|$
Proof:
First, for any labeled graph, define $C(k)$ to be the component of vertex $k$ in that graph.
Now let $W_{n,S} subset W_n$ denote the subset of connected graphs on $n$ labeled vertices, such that when vertex $n$ is removed, the $C(1)$ has vertex set $S$.
When varied over choices of $S$, $W_{n,S}$ partitions $W_n$, so $|W_n| = sum_{S subset {1...,n-1}, 1 in S }|W_{n,S}|$
Suppose $|S| = b$. Since $S$ must include vertex $1$ and cannot include vertex $n$, there are ${n-2 choose b-1}$ possible values for $S$. Then there are $|W_b|$ ways to make a connected component out of those vertices in $S$, and $2^b -1 $ ways vertex $n$ can connect to that component (every possible subset of edges except the emtpy subset). And then there are $|W_{n-b}|$ ways the rest of the graph could look like.
edited Dec 13 '18 at 4:25
answered Dec 9 '18 at 21:04
MarkMark
2,01222449
2,01222449
add a comment |
add a comment |
$begingroup$
IF it is a simple, connected graph, then for the set of vertices {v: v exists in V}, v is adjacent to every other vertex in V. This type of graph is denoted Kn. For Kn, there will be n vertices and (n(n-1))/2 edges.
To determine how many subsets of edges a Kn graph will produce, consider the powerset as Brian M. Scott stated in a previous comment. If S is a finite set with n elements, then the powerset of S will have 2^n elements where n is the number of elements in the set S.
Assuming that the n in Kn is any non-negative integer, then shouldn't the set be considered countably infinite? If so, this would make the cardinality of the powerset Alepha 0.
$endgroup$
$begingroup$
Please use the right math formatting, see e.g. here.
$endgroup$
– Keep these mind
Apr 8 '13 at 8:07
add a comment |
$begingroup$
IF it is a simple, connected graph, then for the set of vertices {v: v exists in V}, v is adjacent to every other vertex in V. This type of graph is denoted Kn. For Kn, there will be n vertices and (n(n-1))/2 edges.
To determine how many subsets of edges a Kn graph will produce, consider the powerset as Brian M. Scott stated in a previous comment. If S is a finite set with n elements, then the powerset of S will have 2^n elements where n is the number of elements in the set S.
Assuming that the n in Kn is any non-negative integer, then shouldn't the set be considered countably infinite? If so, this would make the cardinality of the powerset Alepha 0.
$endgroup$
$begingroup$
Please use the right math formatting, see e.g. here.
$endgroup$
– Keep these mind
Apr 8 '13 at 8:07
add a comment |
$begingroup$
IF it is a simple, connected graph, then for the set of vertices {v: v exists in V}, v is adjacent to every other vertex in V. This type of graph is denoted Kn. For Kn, there will be n vertices and (n(n-1))/2 edges.
To determine how many subsets of edges a Kn graph will produce, consider the powerset as Brian M. Scott stated in a previous comment. If S is a finite set with n elements, then the powerset of S will have 2^n elements where n is the number of elements in the set S.
Assuming that the n in Kn is any non-negative integer, then shouldn't the set be considered countably infinite? If so, this would make the cardinality of the powerset Alepha 0.
$endgroup$
IF it is a simple, connected graph, then for the set of vertices {v: v exists in V}, v is adjacent to every other vertex in V. This type of graph is denoted Kn. For Kn, there will be n vertices and (n(n-1))/2 edges.
To determine how many subsets of edges a Kn graph will produce, consider the powerset as Brian M. Scott stated in a previous comment. If S is a finite set with n elements, then the powerset of S will have 2^n elements where n is the number of elements in the set S.
Assuming that the n in Kn is any non-negative integer, then shouldn't the set be considered countably infinite? If so, this would make the cardinality of the powerset Alepha 0.
answered Apr 8 '13 at 7:25
IffIff
286212
286212
$begingroup$
Please use the right math formatting, see e.g. here.
$endgroup$
– Keep these mind
Apr 8 '13 at 8:07
add a comment |
$begingroup$
Please use the right math formatting, see e.g. here.
$endgroup$
– Keep these mind
Apr 8 '13 at 8:07
$begingroup$
Please use the right math formatting, see e.g. here.
$endgroup$
– Keep these mind
Apr 8 '13 at 8:07
$begingroup$
Please use the right math formatting, see e.g. here.
$endgroup$
– Keep these mind
Apr 8 '13 at 8:07
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f154941%2fhow-to-calculate-the-number-of-possible-connected-simple-graphs-with-n-labelle%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
I don't understand what "no subgraph of a graph is at least connected to one of other subgraphs".
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:33
$begingroup$
Do you allow loops (edges with the same vertex at both ends)? Do you allow more than one edge between two vertices? Finally, can you explain the parenthetical comment in the second paragraph? It’s not clear as it stands.
$endgroup$
– Brian M. Scott
Jun 7 '12 at 2:34
1
$begingroup$
If you are talking about simple connected graphs, then the sequence is A001349 in the On-line encyclopedia of integer sequences. There is no formula given, but there are references for computing the numbers.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:35
$begingroup$
@ArturoMagidin yes, I am talking about simple connected graphs.
$endgroup$
– Shoeinger Veronica
Jun 7 '12 at 2:40
$begingroup$
@ShoeingerVeronica: That's called a "connected" graph. "Simple" means there are no multiple edges between the same two vertices and no loops. So you are talking about the sequence I refered to; there are citations to articles about how to count the number, presumably as efficiently as is known.
$endgroup$
– Arturo Magidin
Jun 7 '12 at 2:40