We consider the representation of the following graph:
The adjacency matrix that represents the graph would be
\begin{equation*}
G=\left(
\begin{array}{cccc}
0 & 1 & 0 & 1 \\
0 & 0 & 1 & 1 \\
0 & 0 & 1 & 0 \\
1 & 0 & 0 & 0 \\
\end{array}
\right)\text{.}
\end{equation*}
The same graph could be represented with the edge dictionary
{1:[2,4],2:[3,4],3:[3],4:[1]}
.
Notice the general form of each item in the dictionary:
vertex:[list of vertices]
.Finally, a list of edges
[(1,2),(1,4),(2,3),(2,4),(3,3),(4,1)]
also describes the same graph.