\documentclass{standalone}

%\usepackage[a4paper, margin=25mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tikz}
\usetikzlibrary{positioning}

\definecolor{darkgreen}{rgb}{0.0, 0.45, 0.0}
\definecolor{darkblue}{rgb}{0.0, 0.0, 0.8}


%%%%%%%%%%%%%%%%%%
%%% Exercise 1 %%%
%%%%%%%%%%%%%%%%%%
\begin{document}

	\begin{tabular}{l||ccc|ccc|ccc|ccc|ccc}
		&  & \color{darkblue} E&  &  & \color{darkblue} F&  &  & \color{darkblue} G& &  & \color{darkblue} H&   \\\hline\hline
		&  &  & \color{darkblue} 2&  &  & \color{darkblue} 8&  &  & \color{darkblue} 3 &  &  & \color{darkblue} 2\\
		\color{darkgreen} A &  &  &  &  &  &  &  &  &	&	&	& \\
		& \color{darkgreen} 2&  &  &\color{darkgreen} 3&  &  &\color{darkgreen} 8&  &  &\color{darkgreen} 2&  &\\\hline     
		&  &  & \color{darkblue} 8&  &  & \color{darkblue} 1&  &  & \color{darkblue} 0&  &  & \color{darkblue} 3\\
		\color{darkgreen} B &  &  &  &  &  &  &  &  &	&	&	& \\
		& \color{darkgreen} 3&  &  &\color{darkgreen} 1&  &  &\color{darkgreen} 0&  &  &\color{darkgreen} 8&  &\\\hline     
		&  &  & \color{darkblue} 3&  &  & \color{darkblue} 0&  &  & \color{darkblue} 1&  &  & \color{darkblue} 8\\
		\color{darkgreen} C &  &  &  &  &  &  &  &  &	&	&	& \\
		& \color{darkgreen} 8&  &  &\color{darkgreen} 0&  &  &\color{darkgreen} 1&  &  &\color{darkgreen} 3&  &\\\hline     
		&  &  & \color{darkblue} 2&  &  & \color{darkblue} 3&  &  & \color{darkblue} 8&  &  & \color{darkblue} 2\\
		\color{darkgreen} D &  &  &  &  &  &  &  &  &	&	&	& \\
		& \color{darkgreen} 2&  &  &\color{darkgreen} 8&  &  &\color{darkgreen} 3&  &  &\color{darkgreen} 2&  &\\\hline
	\end{tabular}


%%%%%%%%%%%%%%%%%%
%%% Exercise 3 %%%
%%%%%%%%%%%%%%%%%%

\tikzstyle{vertex}=[circle, draw=black, minimum size=1em]

\begin{tikzpicture} 
	\node[vertex] (s) at (0,0) {$s$};
	\node[vertex] (t) [right=3cm of s] {$t$};
	\draw[->] (s) to[bend left] node[above, midway] {$d_1(x)=1$} (t);
	\draw[->] (s) to[bend right] node[below, midway] {$d_2(x)=x^2$} (t);
	%
	\node (caption) [below right=1.5cm and 0.7cm of s] {Network i)};
\end{tikzpicture}

\begin{tikzpicture} 
	\node[vertex] (s) at (0,0) {$s$};
	\node[vertex] (t) [right=3cm of s] {$t$};
	\draw[->] (s) to[bend left] node[above, midway] {$d_1(x)=x$} (t);
	\draw[->] (s) to[bend right] node[below, midway] {$d_2(x)=2x$} (t);
	%
	\node (caption) [below right=1.5cm and 0.7cm of s] {Network ii)};
\end{tikzpicture}

\end{document}