Arborescence function

A rooted directed tree