First include the graph drawing library tkz-berge
by adding it the the \usepackage
directive in the document preamble.
The follow code block produces this graph of a simple stable matching:
\begin{tikzpicture}[]
\GraphInit[vstyle=Normal]
\SetUpVertex[Math,Lpos=-180,LabelOut]
\Vertex[x=0,y=2,LabelOut=true]{A_{1,2}}
\Vertex[x=0,y=1,LabelOut=true]{B_{1,2}}
\SetUpVertex[Lpos=0]
\Vertex[x=6,y=2,LabelOut=true]{1_{A,B}}
\Vertex[x=6,y=1,LabelOut=true]{2_{A,B}}
\SetUpEdge[lw=1pt,color=black]
\Edge[](A_{1,2})(1_{A,B})
\Edge[](B_{1,2})(2_{A,B})
\end{tikzpicture}
You can also modify the edge labels to add weights (helpful for question 5b), adding the follow label produces this graph:
\Edge[label=$1$,style={pos=0.25}](A_{1,2})(1_{A,B})
\Edge[label=$1$,style={pos=0.75}](B_{1,2})(2_{A,B})
If you want to customize this further you can peruse the (definitely incomplete) docs: http://ctan.math.illinois.edu/macros/latex/contrib/tkz/tkz-berge/doc/tkz-berge-screen.pdf