How to sort incidence matrix by the number of ones in two dimensions?

75 Views Asked by At

I have a set of "machines", each "machine" is described by a set of "tags". Not all tags present in all machines.

How to find largest subset of tags and largest subset of machines, where each tag is present in each machine?

I drew an incidence matrix like this:

enter image description here

now I want to sort its rows and cols to maximize area of "black" elements, something like this

enter image description here

(it is not guaranteed that the picture is well done)

How to do this?


I am trying to implement maximal biclique enumeration algorith from the paper and getting bicliques like this

enter image description here

Is it maximal in the sense? I.e. it is impossible to add one node and remain biclique?

Or it is erroneous output?


Code is here: https://github.com/dims12/iMBEA