arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1006.4173cs.DScs.DB
收藏

稀疏矩阵乘积的更好大小估计

Better size estimation for sparse matrix products

Rasmus Resen Amossen, Andrea Campagna, Rasmus Pagh

摘要:

我们考虑的问题做快速和可靠的估计的数量的非零条目的稀疏布尔矩阵产品。这个问题在数据库和计算机代数中有应用。设n表示输入矩阵中非零项的总数。我们展示了如何计算一个1 +-ε近似(具有小的错误概率)在预期时间O(n)的任何ε> 4/ \sqrt [4]{z}。Cohen(JCSS 1997)提出的之前最好的估计算法使用时间复杂度为O(n/ε ^2)。我们还提出了一个变体,使用O(排序(n))的I/O的预期中的缓存无关模型。与这些结果相反,目前用于计算稀疏布尔矩阵乘积的最佳算法使用时间ω(n^{4/3})(分别为:(n =O(n)),即使结果矩阵只有非零项。我们的算法结合了Bar-Yossef等人的大小估计技术。(随机2002)与一个特定的成对独立的散列函数类,允许在预期的时间O计算的形式A x C的一组草图(|A| + |C|)和O(sort(|A| + |C|))I/O。然后,我们描述如何使用采样来维护(独立)矩阵的草图,如果z足够大,则允许在时间O(n)中执行估计。这给出了Ganguly等人(PODS 2005)的草图技术的一个更简单的替代方案,并与该论文中显示的空间下限相匹配。最后,我们在真实数据集上进行了实验,结果表明我们的方法的准确性明显优于最坏情况分析预测。

英文摘要:

We consider the problem of doing fast and reliable estimation of the number of non-zero entries in a sparse boolean matrix product. This problem has applications in databases and computer algebra. Let n denote the total number of non-zero entries in the input matrices. We show how to compute a 1 +- epsilon approximation (with small probability of error) in expected time O(n) for any epsilon > 4/\sqrt[4]{z}. The previously best estimation algorithm, due to Cohen (JCSS 1997), uses time O(n/epsilon^2). We also present a variant using O(sort(n)) I/Os in expectation in the cache-oblivious model. In contrast to these results, the currently best algorithms for computing a sparse boolean matrix product use time omega(n^{4/3}) (resp. omega(n^{4/3}/B) I/Os), even if the result matrix has only z=O(n) nonzero entries. Our algorithm combines the size estimation technique of Bar-Yossef et al. (RANDOM 2002) with a particular class of pairwise independent hash functions that allows the sketch of a set of the form A x C to be computed in expected time O(|A|+|C|) and O(sort(|A|+|C|)) I/Os. We then describe how sampling can be used to maintain (independent) sketches of matrices that allow estimation to be performed in time o(n) if z is sufficiently large. This gives a simpler alternative to the sketching technique of Ganguly et al. (PODS 2005), and matches a space lower bound shown in that paper. Finally, we present experiments on real-world data sets that show the accuracy of both our methods to be significantly better than the worst-case analysis predicts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑