On the optimal design of shape resistant structure