We show how to multiply two matrices and over semirings in the \clique model, where nodes communicate in a fully connected synchronous network using -bit messages, within rounds of communication, where and denote the number of non-zero elements in and , respectively. By leveraging the sparsity of the input matrices, our algorithm greatly reduces communication costs compared with general multiplication algorithms [Censor-Hillel et al., PODC 2015], and thus improves upon the state-of-the-art for matrices with non-zero elements. Moreover, our algorithm exhibits the additional strength of surpassing previous solutions also in the case where only one of the two matrices is such. Particularly, this allows to efficiently raise a sparse matrix to a power greater than 2. Our algorithmic contribution is a new \emph{deterministic} method of restructuring the input matrices in a sparsity-aware manner, which assigns each node with element-wise multiplication tasks that are not necessarily consecutive but guarantee a balanced element distribution, providing for communication-efficient multiplication. As applications, we show how to speed up the computation on non-dense graphs of triangle- and -cycle counting, as well as of all-pairs-shortest-paths. Our triangle-counting algorithm completes in rounds, which is a \emph{cubic} improvement over the previously known -round algorithm [Dolev et al., DISC 2012].
View on arXiv