Balanced partitions

suppose n=13.
How do we determine the set of balanced partitions?
What determines the depth?

set of balanced partitions:

  1. find k such that 2^{k-1} < n \leq 2^{k}. Hence \lceil \log_2 n\rceil=k.
  2. let r=2^k-n.
  3. P=\{ (a,b) : a\in[2^{k-1}-r,2^{k-1}] \text{ and } b=n-a\}

depth: indeed the depth is k.