add get_Pc function to estiamte Pc between arbitrary sets in the tree