Max - Flow and Min - Cut, Minimize the number of visible boxes

1.3k Views Asked by At

Suppose that you are given a set of boxes, with each box as a rectangular parallelepiped with side lengths as (i1, i2, i3). And each side length is between half a meter and one meter.

How should a nesting arrangement be chosen so as to minimize the number of visible boxes? Give a polynomial time algorithm for solving this problem.

I've been attempting to generate a graph which would make solving this problem simple by applying the Max - Flow algorithm, but can't seem to move past just understanding needing a graph. At first I thought matching, but then realized that more than one box can be nested in another so that doesn't work.