What is the probability that two graphs picked at random independently from the set of all possible graphs with $8$ vertices is isomorphic? Consider a graph with $8$ vertices. Consider the set of all possible graphs with $8$ vertices. Two persons, pick two graphs at random from this set independently. What is the probability that those two graphs are isomorphic to one another?
With a set of $8$ vertices, we can have $\binom{8}{2}$ edges at max in a graph. If we consider the set of all possible graphs, then each edge may either be present or may not be present in the graph. So, we get $2^{\binom{8}{2}}$ total number of possible graphs in this set.
How to calculate the probability of isomorphism? Can this be extended to the general $n$ case, where $n$ is the number of vertices?
 A: First of all, you have to be a little careful: when you say 'the set of all possible graphs with 8 vertices' you have to be specific about what that set is.  In your case, it sounds like you're interested in labeling the vertices, assigning every possible set of edges, and then forgetting the labels, but you should note that often 'the set of all graphs with 8 vertices' will be defined to have already eliminated any isomorphic couples, in which case the probability is of course just $1/\#S$.
For the case you're considering, the probability in question would of course be (# of isomorphic pairs) / (total number of pairs); the total number of pairs is just $\left(2^{n\choose 2}\right)^2$ since you make two independent selections from the set of all graphs. The number of isomorphic pairs can be written as $\sum_{I\in C}(\#I)^2$, where $C$ is the set of all isomorphism classes and $\#I$ is the number of elements in that class. this could also be written as $\sum_{g\in\mathcal{G}_8} \left(\frac{8!}{\#Aut(g)}\right)^2$, where $\mathcal{G}_8$ is the set of non-isomorphic graphs and $\#Aut(g)$ is the size of the automorphism group of a given graph $g$; the $8!$ here comes from counting all of the different relabelings of vertices (this reformulation is akin to the argument in Burnside's lemma for counting orbits).
Unfortunately, I don't know if there are specific numbers known in your case; according to http://users.cecs.anu.edu.au/~bdm/data/graphs.html there are 12346 non-isomorphic graphs on 8 vertices, and in principle you could use a program like Nauty to compute the exact number you're interested in by counting the size of the automorphism group for each of these graphs, but I don't know if anyone has done that work specifically.  In general, the numbers involved aren't terribly 'nice' because the objects in question are pretty complicated, so certainly an exact expression isn't known for all $n$.
