Basic potential computation on a tree