\documentclass{article}
\usepackage{com.braju.graphicalmodels}
\usepackage{amsmath}
% \special{papersize=40mm,80mm}
% \setlength{\pdfpagewidth}{40mm}
% \setlength{\pdfpageheight}{80mm}
% \usepackage[vcentering,dvips]{geometry}
% \geometry{papersize={80mm,120mm},total={80mm,120mm},margin=0mm}



\catcode`\@=11%

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\LARGE
\psset{unit=10mm,arrowscale=1.5,linewidth=1.5pt}

\begin{pspicture}(0,0)(7,8)%\showgrid
  \SpecialCoor

  \rput(3,1){\circlenode{n9}{\phantom{a}}}  \rput(3,1){$9$}
  \rput(5,1){\circlenode{n7}{\phantom{a}}}  \rput(5,1){$7$}
  
  \rput(1,4){\circlenode{n8}{\phantom{a}}}  \rput(1,4){$8$}
  \rput(3,4){\circlenode{n2}{\phantom{a}}}  \rput(3,4){$2$}
  \rput(5,4){\circlenode{n3}{\phantom{a}}}  \rput(5,4){$3$} 
  \rput(7,4){\circlenode{n5}{\phantom{a}}}  \rput(7,4){$5$}

  \rput(2,7){\circlenode{n1}{\phantom{a}}}  \rput(2,7){$1$}
  \rput(4,7){\circlenode{n6}{\phantom{a}}}  \rput(4,7){$6$}
  \rput(6,7){\circlenode{n4}{\phantom{a}}}  \rput(6,7){$4$}

  \psset{arrows=->,nodesep=2pt,linecolor=black}
  \ncline{n8}{n9}
  \ncline{n8}{n7}
  \pscurve(1,4.3)(1.8,7.6)(3.7,7.2)  %n8 -> n6
  \ncline{n2}{n9}
  \ncline{n2}{n7}
  \ncline{n3}{n9}
  \ncline{n3}{n7}
  \nccircle[angleA=-90]{n3}{0.4cm} % n3 -> n3
  \ncline{n5}{n9}
  \ncline{n5}{n7}
  
  \psset{arrows=->,nodesep=2pt,linecolor=red}
  \ncline{n1}{n8}
  \ncline{n1}{n3}
  \ncline{n1}{n5}
  \ncline{n6}{n8}
  \ncline{n6}{n2}
  \ncline{n6}{n3}
  \ncline{n6}{n5}
  \ncline{n4}{n8}
  \ncline{n4}{n2}
  \ncline{n4}{n3}
  
  \psset{arrows=->,nodesep=2pt,linecolor=blue}
  \pscurve(2.7,1.2)(0.4,4)(1.8,6.8)                 % n9 -> n1
  \pscurve(2.7,1.2)(0.2,4)(2,7.5)(3.6,7)            % n9 -> n6
  \pscurve(2.7,1.2)(0.0,4)(1,7.5)(3.6,8.0)(5.8,7.2) % n9 -> n4
  \pscurve(5.3,1.1)(7.6,4)(6.3,7.5)(4.4,7)          % n7 -> n6
  \pscurve(5.3,1.1)(8.0,4)(6.5,8.0)(2.4,7)

 
\end{pspicture}

\endTeXtoEPS
\end{document}
