[Math] Number of directed graphs

combinatoricsgraph theory

Hi i have to find the number of directed graphs with vertices labelled {${1… n}$}

My idea: For each vertex we can put $n$ ($n-1$ other vertices $+1$ itself) possible edges. So it would be something like $n*2^n$ possible directed graphs.

Is my idea correct. How can i improve it ?

Best Answer

A directed graph can be viewed as a relation. Given a fixed vertex set, the edge set $E \subset [n] \times [n]$, where $[n] = \{1, \ldots, n\}$. The possible subsets of $[n] \times [n]$ are contained contained in the power set $2^{[n] \times [n]}$. So there are $2^{n^{2}}$ possible directed graphs.

Note: My solution allows for loops. If you exclude loops, then you are looking at subsets of $([n] \times [n]) \setminus \{ (i, i) : i \in [n] \}$, which has cardinality $n^{2} - n$. So without loops, there would be $2^{n^{2}-n}$ possible digraphs.

Edit: A small critique of your solution. Each vertex has $2^{n}$ possible edges incident to it. You are determining the digraph by the neighborhood of each vertex. So you have:

$$N(v_{1}) \cup N(v_{2}) \cup \ldots \cup N(v_{n})$$

Where $N(v_{i}) \cap N(v_{j}) = \emptyset$ for distinct $i, j$. For each $i \in [n]$, $N(v_{i}) \in 2^{[n]}$, so there are $2^{n}$ possible options for each $v_{i}$. Hence, there are $(2^{n})^{n} = 2^{n^{2}}$ possible digraphs.