This section is dedicated to the proof of Theorem 3.6 by giving an algorithm for k- BinRank(F) that runs in time O∗(2k2+k). All the arithmetic operations, binary rank, and binary decomposition in this section are over the given field F unless otherwise mentioned.
Let A be the given m × n integer matrix. First we will give an algorithm with the assumption that, A has distinct rows and columns. Later, we will show how to reduce the case when there are duplicate rows or columns to this case. Because of Lemma 3.22, we can safely assume that m, n ≤ 2k (otherwise we know A is a NO instance and we straightaway output that the binary rank of A is greater than k).
The pseudocode of the algorithm is given in Algorithm 1. If A is a YES instance, we know that there exist B∗ ∈ {0, 1}m×k and C∗ ∈ {0, 1}k×n such that A = B∗C∗. Note that the pair B∗, C∗ may not be unique, but we fix some such pair. First, we guess a set of indices of k rows, I = {i1, i2, . . . ik} of B∗ that span the other rows of B∗ (in
line 1). That is, every other row of B can be expressed as a linear combination of rows
i1, i2, . . . , ik (over the field F). Note that we do not need the rows i1, i2, . . . , ik to be
linearly independent, we just need them to span the other rows. Such k rows should exist because B∗ has at most k columns and hence its rank in the real field is at most k. The number of possibilities for this guess is at most mk
≤ 2kk
≤ 2k2. Note that here
we used that m ≤ 2k. Let ˜B and ˜A denote the sub-matrix of B∗ and A respectively, limited to the rows i1, i2, . . . , ik. We also guess the entries of ˜B (also in line 1). Since ˜B
is a binary matrix with k rows and k columns, the number of possibilities for this guess is at most 2k2.
Next, we find columns c1, c2, . . . , cn of our target C ∈ {0, 1}k×neach independently
Algorithm 1: Algorithm for the kernalized instance of k-BinRank(F) Input : A matrix A ∈Zm×n,
Assumption : A has distinct rows and distinct columns
Output : If binary rank of A is at most k then output B ∈ {0, 1}m×k and
C ∈ {0, 1}k×n such that BC = A.
Otherwise report that binary rank of A is greater than k.
1 foreach I = {i1, i2, · · · , ik} ⊆ [m]k , and ˜B ∈ {0, 1}k×k do // Loop 1
2 A ← A˜ I,: 3 for j ∈ [n] do
4 By iterating over all k-length binary vectors, 5 find cj ∈ {0, 1}k such that ˜Bcj = ˜A:,j ;
6 if there is no such cj, then go to the next iteration of Loop 1;
7 end
8 let C be the matrix with c1, c2, · · · , cn as the columns;
9 for i ∈ [m] do
10 By iterating over all k-length binary vectors, 11 find bi ∈ {0, 1}k such that bTi C = Ai,: ;
12 if there is no such bi, then go to the next iteration of Loop 1;
13 end
14 let B be the matrix with bT1, bT2, · · · , bTm as the rows; 15 output B and C and terminate.
16 end
17 report that binary rank of A is greater than k and terminate.
vector cj such that ˜Bcj = ˜A:,j for each j ∈ [n]. We know that for a YES instance such a
cj should exist for all j ∈ [n] as C:,j∗ is one such cj.
Next, we find rows bT
1, bT2, . . . , bTn of our target B ∈ {0, 1}m×k each independently (in
line 11). For a YES instance, such rows should exist as shown by the following lemma.
Lemma 3.27. Let C ∈ {0, 1}k×n be such that ˜BC = ˜A. Then for each i ∈ [m], there exists a vector bi∈ {0, 1}k such that bTi C = aTi .
Proof. We only need to show that at least one such bi exist for each i ∈ [m]. We exhibit
Bi,:∗ as the required bi. We know
Bi,:∗C∗ = Ai,: (3.1)
and also that there exist λ1, λ2, . . . , λk∈ R such that
Bi,:∗ =
k
X
t=1
λtB∗it,: (3.2)
Substituting this in (3.1) gives
k X t=1 λtBi∗t,:C ∗ = A i,: (3.3)
But Bi∗ t,:C
∗ = A
it,: and substituting this in (3.3) gives
k X t=1 λtAit,:= Ai,: (3.4) Now, B∗i,:C = k X t=1 λtBi∗t,:C (3.5) But we know Bi∗
t,:C = Ait,:for all t ∈ [k] by the selection of c1, c2, . . . , cn. By substituting this in (3.5), we have Bi,:∗C = k X t=1 λtAit,: (3.6) = Ai,: (3.7)
where the latter equality follows from (3.4).
Thus if A is a YES instance, then we have found a binary decomposition (B, C) of A of rank k. If we fail to find such a decomposition (which means that for each possibility of i1, i2, . . . , ik and ˜B, we either failed to find a cj for some j ∈ [n] such that ˜Bcj = ˜A
or we failed to find a bi for some i ∈ [m] such that bTiC = Ai,:), then A has to be a NO
instance and we output in line 17 that the binary rank of A is greater than k. Thus we have proved the correctness of Algorithm 1.
Next, we prove that Algorithm 1 runs in O(22k2+2k) time. First, let us estimate the number of iterations of Loop 1 in Algorithm 1. As discussed above, the number of possibilities for i1, i2, . . . , ik is at most 2k
2
and that for ˜B is also at most 2k2. Hence, the
number of iterations of Loop 1 is at most 2k2· 2k2
= 22k2. The two inner loops only have at most n and m iterations respectively, each of which is at most 2k. Each iteration of the inner loops takes O(2k) time, as there are only 2k k-length binary vectors. Hence,
the total time taken by Algorithm 1 is in O(22k2+2k).
It remains to take care of the case when A has duplicate rows or columns. We remove the duplicate rows and columns by applying the Reduction rule 3.20 exhaustively on A. Let A0 be the resultant matrix. We know all rows of A0 are distinct and all columns of A0 are distinct. We run Algorithm 1 on A0. If Algorithm 1 returns a rank-
k binary factorization of A0, then we compute a rank-k binary factorization of A as given in Lemma 3.21. Instead, if Algorithm 1 returns that the binary rank of A0 is greater than k, then we output that the binary rank of A is greater than k. This is correct as bin(A) = bin(A0) by Lemma 3.21. The parts except the call to Algorithm 1 takes O(mn(log m + log n)) time by Lemma 3.21. Hence the whole algorithm takes only O(22k2+2k
+ mn(log n + log m)) time. This completes the proof of Theorem 3.6.