Suppose A and B are initial Boolean matrices. Let C = A*B. Suppose one can perform the sequence of the next operations: "set A[i,j] = 1", "set B[i,j] = 1". The result of each operation is a set of updated cells (not just affected, it is important that value is changed from 0 to 1) in matrix C. Is there any research on this problem? Can we do the update (theoretically) faster than in a naive way? For example, are there estimations on possible speedup by a logarithmic factor? The problem looks slightly similar to incremental transitive closure or dynamic matrix inverse, but quite specific.

  • 2
    $\begingroup$ Could you specify what kind of result you expect ? The matrix product is bilinear, so $(A_1+A_2)\times B=A_1\times B+ A_2\times B$, and doing each update is therefore pretty easy (linear in one of the dimensions). $\endgroup$
    – xavierm02
    Jul 25, 2020 at 7:37
  • $\begingroup$ @xavierm02 Thank you! I try to find a theoretically optimal solution. Can we do the update better than in a naive way? The original question is extended. $\endgroup$
    – gsv
    Jul 28, 2020 at 10:03
  • $\begingroup$ If you start with $A=0$, and $B$ with each cell equal to $1$, then adding a $1$ to $A$ induces $n$ writes in $C$. So unless you take a non-standard representation for $C$, you can't get anything sublinear in the dimension in the worst case. $\endgroup$
    – xavierm02
    Jul 28, 2020 at 22:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.