3
$\begingroup$

Let say I have two $n$ x $n$ matrices $A$ and $B$ where all elements are real positive values. I want to find some $n$ x $n$ permutation matrix $P$ such that $\operatorname{tr}(P A P ^T B)$ is minimized. Does there exist such an algorithm or technique?

$\endgroup$
2

1 Answer 1

5
$\begingroup$

This problem is NP-hard.

Let $A$ be the adjacency matrix of an $n$-cycle plus the all-ones matrix and $B$ the adjacency matrix of a graph $G$ plus the all-ones matrix.

Then, if $G$ has a Hamiltonian cycle, the maximum trace is achieved when the elements of $PAP^T$ with value $2$ corresponds to a Hamiltonian cycle in $G$. Since finding Hamiltonian cycles is NP-hard, your problem is NP-hard.

$\endgroup$
1
  • $\begingroup$ Oh no! I was afraid this was the case. Your proof is very elegant so I can’t even argue with it. My only criticism is that my question was about minimizing not maximizing, but your general proof would still work in the minimizing case if you set $A$ equal to 1 - (n adjacency matrix) instead $\endgroup$ Commented Feb 13, 2022 at 20:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .