Given an N-dimensional matrix A
, I want to find an M<N
dimensional index array I
such that the submatrix A[I, I]
has the maximum element sum over all such I
vectors.
For example for 3-dimensional
A =
1 2 3
4 5 6
7 8 9
and 2-dimensional index [1,3]
A[(1,3), (1,3)] =
1 3
7 9
So basically this is a discrete optimisation problem with N choose M possible solutions.
Is there an efficient way to find the best solution?