2 ms·
Out of the blue (I did not look into the paper) I would have taken a stab at it like so: I would start from the 12 case then remove one internal edge, which ma
by lloeki 14y ago
Out of the blue (I did not look into the paper) I would have taken a stab at it like so:
I would start from the 12 case then remove one internal edge, which makes for all the 11 cases, then removing two edges (or one more edge if we're building a tree), and so on down to 1. We'll have to evaluate a few constraints on edges so as to ensure to only retain forms when they are rectangles.
After that (or at each step if you don't want the full list) we look for duplicates through rotation and symmetry. A possible implementation of the latter would be to model each case by numbering edges, and absence/presence of edges will set that bit/power of two, thus each case is a bitfield/integer, upon which we could apply a rotation function that tilts the bits, and then merely compare the resulting integers.
I guess this would be very close to a worst case in terms of complexity since it's essentially brute-force. Well, there are 17 edges to consider so that's 217 possibilities.