\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning, fit, shapes, arrows}
\pgfdeclarelayer{bg}
\pgfsetlayers{bg,main}
\input{hedge.tex}
\begin{document}
\begin{tikzpicture}[every node/.style={draw, circle, inner sep=1pt}, grow=up]
\node(0) {0}
child{node(1){1}}
child{node(2){2}
child{node(3){3}
child{node(4){4}}
}}
child{node(5){5}};
\hedge[red]{0,2,1}{0.2cm}
\hedge[blue]{0,2,3,1}{0.3cm}
\hedge[green]{0,5,4,1}{0.4cm}
\end{tikzpicture}
\end{document}