Let $X = {x_1,x_2,..,x_n}$ and $Y = {y_1,y_2,..,y_n}$ be two set of points, where $x_i,y_i \in \mathbb{R}^{n\times k}, i \in[n]$. The goal is to find a permutation $\pi:[n]\to[n]$, orthogonal(rotation) matrix $R \in \mathbb{R}^{k \times k}$ and a translation vector $t$ such that the following error is minimized:
$$\sum_{i=1}^n |Rx_{\pi(i)} + t - y_i|_2^2$$
Another equivalent error is:
$$\sum_{i=1}^n |Rx_i + t - y_{\pi(i)}|_2^2$$
These errors can be written in matrix form:
$$|P(XR + 1t^T) - Y|_F^2$$
and
$$|XR + 1t^T - PY|_F^2$$
Here $P$ is the permutation matrix.