# Metric conversion in trees?

Say you have a balanced binary decision tree with depth $$L$$ and we know the sequence $$p_1$$ of $$0/1$$ decisions we need to make from root to one of the leaves $$\ell_1$$. This $$0/1$$ string is what I call the absolute path.

Now let leaf $$\ell_2$$ be $$t_{12}$$ leaves to the right of $$\ell_1$$. This $$t_{12}$$ is what I call relative Distance.

1. Given $$p_1$$ and $$t_{12}$$ can we find $$p_2$$?

2. Given $$p_1$$ and $$p_2$$ can we find $$t_{12}$$?

The answer to both queries is yes. However my goal is to convert them with only linear operations?

Is there linear relation between the three? Can we convert them with only linear operations?