calculate the dependence between each branch and checkpoints.