This seems to be a simple problem but I am stuck at this problem. The problem is that I have a matrix of size X x Y. There may be some points at (i,j). It is, however, not necessary that all locations (i,j) should have a point (i.e. there are < XY points). How should I can select the biggest subset of these points such that no points in the selected subset has same i (row number) or j (column number)
This seems to be a simple problem but I am stuck at this problem.
Share
This is the maximum matching problem, which is poly-time solvable. Given an instance of your problem, construct a bipartite graph with nodes a1, …, aX, b1, …, bY, and edges aibj for all (i,j) where there’s a point. Take the points corresponding to the edges in a maximum matching.