Position of center of mass/gravity that ensures balance I have got this problem asking where should the center of mass be positioned in the Y axis to ensure that the "system/body" is stable.
Picture:

Let the table be y=0
The answer is that the center of mass has to be Ycm<0 in order for the system to be balanced.
I would really appreciate an intuitive explanation and a mathematical one too.
Thanks in advance!  
 A: In order for the “system/body” to be stable, the sum of the moments about the contact point between $M$ and the table must be zero. 
The top diagrams show the center of mass ($cm$) above the table, or $Y>0$ and the bottom diagrams show the center of mass below the table, or $Y<0$. In both cases, the left diagrams show that the $cm$ acts vertically through the contact point and thus contributes no moment. As long as the small masses $m$ are perfectly balanced, it doesn’t matter if the $cm$ is above or below the table.
Now look at the top right diagram. I have rotated the system clockwise simulating the small mass $m$ on the right causing an imbalanced clockwise moment.  I have rotated the system 20 degrees in order to exaggerate the effect. Note that the center of mass is no longer acting through the point of contact and is contributing an additional clockwise moment, furthering the instability.
Now look at the bottom right diagram. The same rotation to the right results in the $cm$ contributing a counter-clockwise moment, counteracting the clockwise moment due to the small mass unequal moment clockwise. 
Consequently, locating the $cm$ below the contact point tends to stabilize the structure whereas locating it above the contact point contributes to instability.
Hope this helps.

A: 
The behavior of this Object is like a pendulum.
Object A is unstable system.
Object B is stable system.
This is way the center of mass must be under the table.
You can  calculate the geometry for object B (for b=a)  by adjusting the length a 

with:
$D=d\sqrt{2}$
$h^2+\left(\frac{a\sqrt{2}}{2}\right)^2=a^2$
so 
$h=\frac{1}{2}\sqrt{2}\,a> D\quad \Rightarrow\quad a > 2d$
A: If you turn the system slightly, the equilibrium will be stable only if the center of gravity rises a little (We need a minimum of potential energy to have a stable equilibrium position). This is only possible if the center of gravity is below the axis of rotation.
