I am not sure that my question is clear from the first sight. But I will try to explain what I mean. For now, I am learning balancing the trees on the example of AVL trees. We know that to balance tree wnen new node is added, we turn the tree either to left or right, e.g if new node in left child's left subtree (left-left) we turn it to right, or in right-right case we turn it to left.
It is not hard to notice the pattern, that if left subtree is heavier then we turn it to right and vice versa. For me it is like standing and balancing on the board (that's my intuition).
Here assume that B is root and new node somewhere in right subtree of C, which root is A. Here one rotation is not enough, i.e. we need to turn it first to left, then to right. So the point is in middle rotation the we make, it is like bringing tree to rotatable form. Because if I have tree in following form, I can just rotate the tree to right, that's all.
So it looks like in previous image what we were doing is to bringing the tree to the form of tree as in the last example. Because rotating it directly to right doesn't solve problem, actually we get again unbalanced tree but with right heavy part.
I am familiar with optimization methods, also Pareto efficient points, etc, and somehow feel that there is something like that. If you want to decrease the height of one subtree, then you must increase somewhere, and vice versa. All good people already devised pattern for all cases. But I can't understant what are these properties (maybe how we can mathematically define that properties) of that middle, even stable stage. I feel it, but can not understand these properties. Or maybe I am absolutely wrong. Sorry for long question. But I will be very happy if you answer and clarify this for me.