title: Box stacking problem
body: <p>I found this famous dp problem in many places, but I can not figure out how to solve.</p>
  
  <blockquote>
    <p>You are given a set of n types of
    rectangular 3-D boxes, where the i^th
    box  has height h(i), width w(i) and
    depth d(i) (all real numbers). You
    want to create  a stack of boxes which
    is as tall as possible, but you can
    only stack a box on top of another box
    if the dimensions of the 2-D base of
    the lower box are each strictly larger
    than those of the 2-D base of the
    higher box. Of course, you can rotate
    a box so that any side functions as
    its base. It is also allowable to use
    multiple instances of the same type of
    box.</p>
  </blockquote>
  
  <p>This problem seems too complicated for me to figure out the steps. As it is 3D, I get three sequence of height, width and depth. But as it is possible to exchange 3 dimension the problem becomes more complicated for me. So please someone explain the steps to solve the problem when there is no swapping and then how to do it when swapping. I became tired about the problem. So please, please someone explain the solution easy way.</p>