Derive a formula that relates the depth of a node v to the depths of nodes adjacent to v.