erlang - distributed spanning tree