Maximize the number of matrix elements selected

104 Views Asked by At

Given a binary matrix $A \in \{0,1\}^{n \times m}$, let's select a subset of its rows $I = \{i_1, i_2, \dots, i_l\}$ and a subset of its columns $J = \{j_1, j_2, \dots, j_k\}$. We call pair $(I, J)$ interesting if for each $i \in I$ and $j \in J$ we have $A_{ij} = 1$.

How can I find interesting pair $(I, J)$ that maximizes $|I| \cdot |J| = lk$ ?

If getting precise solution is hard, you're welcome to suggest approximate algorithms or heuristics. The problem comes from real life, so this also suits me.

Any help would be greatly appreciated!

P.S. I just need to find any large enough sub-matrix full of 1. Not necessarily with maximum number of elements. Initially I have, say $5000 \times 20000$ matrix, but I need only $100 \times 200$ sub-matrix, that would be enough. I understand that the initial problem is most likely to be NP-hard, but I need some heuristic or approximation algorithm.