TITLE: Is the Set of all Graphs Countable?
QUESTION [5 upvotes]: I am taking an elementary level set theory, and was doing an exercise.
The question is "Is the set of all graphs countable?" 
My intuition tells me it is not but I am not sure how I can use Cantor's diagonalization argument to prove it. And I don't even know what other methods can be used here.
P.S A graph means a graph in the sense of Graph Theory.

REPLY [3 votes]: Each of the existing answers proceeds based on more specific interpretations of the general "set of all graphs."
Consider this more specific version: is the set $G$ of all unweighted graphs on finite sets (each $g \in G$ has a finite set $V$) up to isomorphism a countable set?
I'd like to show that this set is countably infinite via a bijection with a subset of all binary strings.
There is a finite number of unweighted isomorphic graphs with $n$ vertices, where $n \in ℕ$. The set of all possible edge permutations of an $n$-vertex graph, then, is $\wp M$, where $M$ is the set of all possible edges on an  $n$-vertex graph. Because $|M|= n \times n$, $|\wp\ M| = 2^{n \times n}$, which is the number of unweighted isomorphic graphs with $n$ vertices.
This is finite, but because $n \in ℕ$, we can conclude that $G$ is infinite: $|G| = \sum \limits_{n=1}^ \infty 2^{n \times n}$.
To conclude that our set $G$ is countable, we can construct a bijection with another countable set. Because we're only considering finite graphs we can construct an adjacency matrix to uniquely represent each $g \in G$, which will contain some $n \times n$ permutation of weights 0 (no edge) and 1 (edge). If we catenate the rows of such an adjacency matrix, we get a finite binary string of length $n \times n$ for each $g \in G$.
Let's define $A$ as the set of adjacency strings for each $g \in G$. We know that $G\xrightarrow{\rm 1:1,onto}A$.
Because $A \subset$ the countable set of all finite binary strings, $A$ is countable. Because we've described a bijection between $G$ and $A$, we conclude $G$ is countably infinite.
What if we introduce weighted graphs? If we define a finite set of possible edge weights in graphs in $G$, the bijection holds (e.g. if a graph $g$ can have $w$ weights, we can describe it with a base-$(w+1)$ string).