Fall wants to draw a perfect binary tree.
We first stipulate that all nodes in the tree with the same depth also have the same y-coordinate in the plane. Define nodes with the same depth to be nodes at the same level, then the perfect binary tree has four properties.
- It is a full binary tree.
- The difference between the y-coordinates of two nodes at each adjacent level is a constant.
- The difference between the x-coordinates of two adjacent nodes at the same level is constant.
- The x-coordinate of each node is the average of the x-coordinates of its sons.
Fall has drawn the root node and its left and right sons of this binary tree. Now Fall intends to draw a total of $k$ levels and cut the binary tree down and paste it on the wall afterwards, so he wants to know what is the area of the convex hull of all nodes of this perfect binary tree.
Hint
Here's the picture of the perfect binary tree for the first example, whose area is $S_{ABC}+S_{BCGD}=14$