ACM ICPC World Finals 2011

Problem B: Affine Mess

There are four unknown parameters to determine: the matching of input points to output points, the rotation, the scaling, and the translation. There are at most 6 ways of matching the input points to the output points, and at most 80 different possibilities for the rotation, so we can simply try all of these.

Once the matching of points and rotation has been fixed, determining if there are valid scaling and translation parameters (and verifying their uniqueness) boils down to simple algebra.