Algorithms for Causal Reasoning in Probability Trees