For a Boolean matrix D, let r_D be the minimum number of rectangles sufficient to cover exactly the rectilinear region formed by the 1-entries in D. Next, let m_D be the minimum of the number of 0-entries and the number of 1-entries in D. Suppose that the rectilinear regions formed by the 1-entries in two n * n Boolean matrices A and B totally with q edges are given. We show that in time O-tilde(q + min{r_Ar_B, n(n + r_A), n(n + r_B)})~1 one can construct a data structure which for any entry of the Boolean product of A and B reports whether or not it is equal to 1, and if so, reports also the so called witness of the entry, in time O(log q). As a corollary, we infer that if the matrices A and B are given as input, their product and the witnesses of the product can be computed in time O-tilde(n(n + min{r_A, r_B})). This implies in particular that the product of A and B and its witnesses can be computed in time O-tilde(n(n + min{m_A, m_B})). In contrast to the known sub-cubic algorithms for Boolean matrix multiplication based on arithmetic 0 - 1-matrix multiplication, our algorithms do not involve large hidden constants in their running time and are easy to implement.
展开▼
机译:对于布尔矩阵D,让R_D是足以覆盖D的最小矩形的最小矩形数。接下来,让M_D是0个条目数量的最小值和1-在D.中的条目假设给出了由两个N * N布尔矩阵A和B完全具有Q边缘的1条条目形成的直线区域。我们表明,在时间O-TILD(Q + MIN {R_AR_B,N(n + R_A),n(n + r_b),n(n + r_b)})〜1可以构造一个数据结构,该数据结构对于A和B的任何BOOLEAN产品的输入报告它是否等于1,如果是的话,还报告所谓的条目证人,在时间o(log q)。作为推论,我们推断,如果矩阵A和B作为输入,它们的产品和产品的证人可以在时间O-TildE(n(n + min {r_a,r_b})中计算)。这尤其意味着可以在时间O-TildE(n(n + min {m_a,m_b})中计算A和B的乘积。与基于算术0 - 1矩阵乘法的布尔矩阵乘法的已知子立方算法相反,我们的算法不涉及其运行时间的大隐藏常量,并且易于实现。
展开▼