arXiv:2609.10496cs.DSSep 2026

Manuscript Offprint

arXiv:2609.10496

Testing the Binary Rank with Polynomial Query Complexity

Michal Parnas

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We provide an adaptive two-sided error testing algorithm for the binary rank of a 0, 1 matrix MM with query complexity O(d3log⁡(d+1)/ϵ2)O(d^3 \log(d+1)/\epsilon^2), where dd is the tested binary rank bound and ϵ\epsilon is the distance parameter. This answers an open question posed by Parnas, Ron and Shraibman [11], who asked whether the binary rank can be tested with query complexity polynomial in dd and 1/ϵ1/\epsilon.

Furthermore, our testing algorithm can be used to find an approximate binary decomposition of MM with an additional d(n+m)d(n+m) queries. That is, under the promise that the binary rank of MM is at most dd, we show how to find, with probability at least 5/6, two 0,1 matrices A′,B′A', B' such that M′=A′⋅B′M' = A' \cdot B' is a 0,1 matrix which differs from MM on at most an O(ϵ)O(\epsilon) fraction of its entries.

Key Words— Real rank, Boolean rank, Binary rank.

1 Introduction

Rank functions have been used over the years to capture the complexity of an object. The most notable is the usual rank defined over the reals, which originated from the study of linear equations, but since then found many more applications. Whereas the real rank of a matrix MM is usually defined as the maximal number of independent rows or columns of MM, we use the following equivalent definition.

The real rank of a matrix MM of size n×mn \times m, denoted here by rankR(M)\text{rank}_{\mathbb{R}}(M), is the minimal integer dd for which there exist real matrices AA and BB of size n×dn \times d and d×md \times m respectively, such that M=A⋅BM = A \cdot B, where the operations are over R\mathbb{R}.

Other rank functions considered over the years include the Boolean, binary and non-negative rank functions. Here we consider the binary rank defined as follows.

The binary rank of a 0,1 matrix MM of size n×mn \times m, denoted by rankbin(M)\text{rank}_{\text{bin}}(M), is the minimal dd for which there exist 0,1 matrices AA and BB of size n×dn \times d and d×md \times m respectively, such that M=A⋅BM = A \cdot B, where the operations are over the integers.

*School of Computer Science, The Academic College of Tel Aviv-Yaffo, Tel Aviv 61083, Israel. Email address: michalp@mta.ac.il

The product A⋅BA \cdot B is called a decomposition of size d of M. Note that by definition, rankR(M)≤rankbin(M)\text{rank}_{\mathbb{R}}(M) \leq \text{rank}_{\text{bin}}(M) for any 0,1 matrix M.

The real rank is defined over a field and can be computed in polynomial time. In contrast, the other rank functions mentioned above are defined over a semi-group and are NP-hard to compute (see Orlin [9], Jiang and Ravikumar [6], Vavasis [14] and Shitov [13]). See also a recent comprehensive survey about these rank functions by Parnas [10].

This motivates to find relaxations of the exact hard decision problems. One such relaxation is that of Property testing, a field which originated in a paper of Rubinfeld and Sudan [12] who introduced the notion of testing functions, and a paper by Goldreich, Goldwasser and Ron [4] who initiated the study of testing graph properties.

The idea proposed in [12, 4] was to relax the classic notion of decision algorithms and define testing algorithms which should, with high constant probability, accept an object that has the given property studied, and reject an object that is ϵ\epsilon-far from having the property, that is, at least an ϵ\epsilon-fraction of the object should be modified so that it has the tested property. For example, a testing algorithm for the rank property should decide if a matrix has rank at most d or is ϵ\epsilon-far from any matrix with rank at most d, for a given rank function.

This relaxation allows testing algorithms to be very efficient in comparison with regular decision algorithms, where in many cases their query complexity is sub-linear and even independent of the input size, but depends on the error parameter ϵ\epsilon and maybe some other parameters of the problem.

In our setting, if Mi,jM_{i,j} is the entry in the ii'th row and jj'th column of MM, then the distance between two 0,1 matrices M,M′M, M' of size n×mn \times m is defined as:

dist(M,M′)=∣{(i,j)∣Mi,j≠Mi,j′}∣n⋅m.\mathrm{dist}(M,M^{\prime})=\frac{|\{(i,j)\mid M_{i,j}\neq M_{i,j}^{\prime}\}|}{n\cdot m}.

A matrix MM is ϵ\epsilon-far from binary rank at most dd if dist(M,M′)≥ϵ\mathrm{dist}(M, M') \geq \epsilon for every binary matrix M′M' with rankbin(M′)≤d\mathrm{rank}_{\mathrm{bin}}(M') \leq d. Thus, in the context of testing the rank of a matrix, the requirement from a testing algorithm is defined formally as follows:

Definition 1. A testing algorithm for a given rank function is given query access to an n×mn \times m matrix M, an error parameter ϵ\epsilon and a parameter d. The algorithm should accept with probability at least 2/3 if M has rank at most d, and should reject with probability at least 2/3 if M is ϵ\epsilon-far from every matrix of rank at most d.

The query complexity of the algorithm is the number of entries of M which it queries. The algorithm is non-adaptive if it determines its queries based only on the input and the random coin tosses, independently of the answers provided to previous queries. Otherwise, the algorithm is adaptive.

Although the real rank can be computed in polynomial time, Krauthgamer and Sasson [7] showed that there exists a non-adaptive property testing algorithm for the real rank with query complexity O(d2/ϵ2)O(d^{2}/\epsilon^{2}). Li, Wang and Woodruff [8] gave an adaptive algorithm for the real rank with a reduced query complexity of O(d2/ϵ)O(d^{2}/\epsilon). Balcan, Woodruff and Zhang [1] gave a non-adaptive testing algorithm for the real rank with query complexity O~(d2/ϵ)\tilde{O}(d^{2}/\epsilon).

Parnas, Ron and Shraibman [11] developed algorithms for testing the binary and the Boolean rank. They give a non-adaptive testing algorithm for the Boolean rank with query complexity

O~(d4/ϵ6)\tilde{O}(d^4/\epsilon^6). For the binary rank they provide a non-adaptive algorithm with query complexity O(22d/ϵ2)O(2^{2d}/\epsilon^2), and an adaptive algorithm with query complexity O(22d/ϵ)O(2^{2d}/\epsilon). Bshouty [2] subsequently gave a one-sided adaptive tester for the binary rank with query complexity O~((d+1)2d/ϵ)\tilde{O}((d+1)2^d/\epsilon), improving the dependence on dd in [11] by a factor of Θ~(2d)\tilde{\Theta}(2^d), but still leaving an exponential dependence on dd. He also noted that a small adjustment to the analysis given by [11] for the Boolean rank results in an improved query complexity of O~(d4/ϵ4)\tilde{O}(d^4/\epsilon^4). Note that the query complexity of all the above testing algorithms is independent of the size of the matrix MM.

It was asked in [11] if there exists an algorithm for the binary rank with polynomial query complexity in 1/ϵ1/\epsilon and dd. We answer this question in the affirmative and prove the following:

Theorem 2. For every integer d≥1d \geq 1 and 0<ϵ≤10 < \epsilon \leq 1, there is an adaptive two-sided error testing algorithm for the binary rank with query complexity O(d3log⁡(d+1)ϵ2)O\left(\frac{d^3 \log(d+1)}{\epsilon^2}\right).

Using this result we also provide an approximate decomposition of the matrix MM as follows.

Theorem 3. Let d≥1d \geq 1 and 0<ϵ≤10 < \epsilon \leq 1, and let MM be a 0,10,1 matrix of size n×mn \times m with rankbin(M)≤d\text{rank}_{\text{bin}}(M) \leq d. There is an adaptive randomized algorithm which uses O(d(n+m)+d3log⁡(d+1)ϵ2)O\left(d(n+m) + \frac{d^3 \log(d+1)}{\epsilon^2}\right) queries, and with probability at least 5/65/6 outputs 0,10,1 matrices A′A' and B′B' of size n×dn \times d and d×md \times m, respectively, such that M′=A′⋅B′M' = A' \cdot B' is a 0,10,1 matrix with dist(M,M′)≤O(ϵ)\text{dist}(M, M') \leq O(\epsilon).

We note that although the query complexity of both algorithms is polynomial in dd and 1/ϵ1/\epsilon the running time of both algorithms is exponential in dd.