Definition
Distinct Row Matrix Completion Decision Problem
Given a matrix
and an integer , this decision problem asks whether we can replace all s by or so the completed matrix has at most distinct rows.
Complexity
Constant number of incomplete users
Suppose only ? entries so that
Comparing
If more than one user has missing entries, the incomplete users can potentially be completed so that they become equal to each other, not just to an already complete user.
Consider the case where there are only constantly many incomplete users, say
- If an incomplete user can be completed to equal an already complete row, we can merge it with that row.
- For the remaining incomplete users, we try all possible ways of grouping them into identical completed rows.
A group of incomplete users is feasible exactly when their known entries never conflict. That is, for every column, we must never have one user with known value ? entries can be filled so that all users in the group become the same row.
For example,
can all be completed to
so they form one distinct row.
In contrast,
cannot be grouped because their first entries conflict.
Thus, we can brute-force over all partitions of the
Therefore,
Hence, Distinct Row Matrix Completion is polynomial-time solvable when only constantly many rows contain missing entries
Input-dependent number of incomplete users
If the number
In fact, Distinct Row Matrix Completion is NP-complete, even if the matrix is almost complete: each row and each column may contain at most
Importantly,
does not imply that only constantly many rows are incomplete. We may still have ? entries.
Membership in NP is straightforward: a completed matrix is a certificate. Given such a completion, we can check in polynomial time that
- every
?was replaced byor while all originally known entries remain unchanged, and - the completed matrix contains at most
distinct rows.
NP-hardness is obtained by a reduction from a special version of 3-Coloring.
Thus,
The problem remains NP-complete even under the strong restriction that every row and every column contains at most