<Li> The number of leaf nodes l (\ displaystyle l) in a perfect binary tree, is l = (n + 1) / 2 (\ displaystyle l = (n + 1) / 2) because the number of non-leaf (a.k.a. internal) nodes n − l = ∑ k = 0 log 2 ⁡ (l) − 1 2 k = 2 log 2 ⁡ (l) − 1 = l − 1 (\ displaystyle n-l = \ sum _ (k = 0) ^ (\ log _ (2) (l) - 1) 2 ^ (k) = 2 ^ (\ log _ (2) (l)) - 1 = l - 1). </Li> <Li> This means that a perfect binary tree with l (\ displaystyle l) leaves has n = 2 l − 1 (\ displaystyle n = 2l - 1) nodes . </Li> <Li> In a balanced full binary tree, h = ⌈ log 2 ⁡ (l) ⌉ + 1 = ⌈ log 2 ⁡ ((n + 1) / 2) ⌉ + 1 = ⌈ log 2 ⁡ (n + 1) ⌉ (\ displaystyle h = \ lceil \ log _ (2) (l) \ rceil + 1 = \ lceil \ log _ (2) ((n + 1) / 2) \ rceil + 1 = \ lceil \ log _ (2) (n + 1) \ rceil) (see ceiling function). </Li> <Li> In a perfect full binary tree, l = 2 h (\ displaystyle l = 2 ^ (h)) thus n = 2 h + 1 − 1 (\ displaystyle n = 2 ^ (h + 1) - 1). </Li>

The maximum number of nodes in a binary tree of depth 5 is