No, the two are not equivalent.
3
/ \
2 7
/ / \
1 5 8
/ \ \
4 6 9
is a tree satisfying property 2, but not property 1.
Property 1 implies property 2, however.
Proposition: In a binary tree that is balanced according to property 1 with n
inner nodes, all leaves are at a depth of
k
if n = 2^k - 1
k
or k+1
if 2^k <= n < 2^(k+1)-1
, and there are leaves at depth k+1
.
Proof: (By induction on the number of inner nodes)
For n = 1 = 2^1-1
, there are one or two leaves at depth 1 (root is at depth 0).
For n = 2
, one subtree has one inner node, all leaves in that subtree are at depth 2, the other subtree is empty or a leaf at depth 1.
Let n >= 2
and consider a binary tree that is balanced according to property 1 with n+1
inner nodes.
If n
is even, n = 2*m
, both subtrees must have m
inner nodes, and the depth property holds by the induction hypothesis.
If n = 2*m+1
is odd, one subtree has m
inner nodes, the other m+1
.
If 2^k <= m < 2^(k+1)-1
, the subtree with m
inner nodes has leaves at depth k+1
, and possibly leaves at depth k
by the induction hypothesis. The tree with m+1
inner nodes also has leaves at depth k+1
and possibly (if m+1 < 2^(k+1)-1
) at depth k
.
If m = 2^k - 1
, the subtree with m
inner nodes has leaves only at depth k
, and the subtree with m+1
inner nodes has leaves at depth k+1
and possibly at depth k
.
Property 1 => Property 2
. – Daniel Fischer