比蛮力更快地计算广义卷积

IF 0.9 4区 计算机科学 Q4 COMPUTER SCIENCE, SOFTWARE ENGINEERING Algorithmica Pub Date : 2023-10-06 DOI:10.1007/s00453-023-01176-2
Barış Can Esmer, Ariel Kulik, Dániel Marx, Philipp Schepper, Karol Węgrzycki
{"title":"比蛮力更快地计算广义卷积","authors":"Barış Can Esmer,&nbsp;Ariel Kulik,&nbsp;Dániel Marx,&nbsp;Philipp Schepper,&nbsp;Karol Węgrzycki","doi":"10.1007/s00453-023-01176-2","DOIUrl":null,"url":null,"abstract":"<div><p>In this paper, we consider a general notion of convolution. Let <span>\\(D\\)</span> be a finite domain and let <span>\\(D^n\\)</span> be the set of <i>n</i>-length vectors (tuples) of <span>\\(D\\)</span>. Let <span>\\(f :D\\times D\\rightarrow D\\)</span> be a function and let <span>\\(\\oplus _f\\)</span> be a coordinate-wise application of <i>f</i>. The <span>\\(f\\)</span>-<span>Convolution</span> of two functions <span>\\(g,h :D^n \\rightarrow \\{-M,\\ldots ,M\\}\\)</span> is </p><div><div><span>$$\\begin{aligned} (g \\mathbin {\\circledast _{f}}h)(\\textbf{v}) {:}{=}\\sum _{\\begin{array}{c} \\textbf{v}_g,\\textbf{v}_h \\in D^n\\\\ \\text {s.t. } \\textbf{v}= \\textbf{v}_g \\oplus _f \\textbf{v}_h \\end{array}} g(\\textbf{v}_g) \\cdot h(\\textbf{v}_h) \\end{aligned}$$</span></div></div><p>for every <span>\\(\\textbf{v}\\in D^n\\)</span>. This problem generalizes many fundamental convolutions such as Subset Convolution, XOR Product, Covering Product or Packing Product, etc. For arbitrary function <i>f</i> and domain <span>\\(D\\)</span> we can compute <span>\\(f\\)</span>-<span>Convolution</span> via brute-force enumeration in <span>\\(\\widetilde{{\\mathcal {O}}}(|D|^{2n} \\cdot \\textrm{polylog}(M))\\)</span> time. Our main result is an improvement over this naive algorithm. We show that <span>\\(f\\)</span>-<span>Convolution</span> can be computed exactly in <span>\\(\\widetilde{{\\mathcal {O}}}( (c \\cdot |D|^2)^{n} \\cdot \\textrm{polylog}(M))\\)</span> for constant <span>\\(c {:}{=}3/4\\)</span> when <span>\\(D\\)</span> has even cardinality. Our main observation is that a <i>cyclic partition</i> of a function <span>\\(f :D\\times D\\rightarrow D\\)</span> can be used to speed up the computation of <span>\\(f\\)</span>-<span>Convolution</span>, and we show that an appropriate cyclic partition exists for every <i>f</i>. Furthermore, we demonstrate that a single entry of the <span>\\(f\\)</span>-<span>Convolution</span> can be computed more efficiently. In this variant, we are given two functions <span>\\(g,h :D^n \\rightarrow \\{-M,\\ldots ,M\\}\\)</span> alongside with a vector <span>\\(\\textbf{v}\\in D^n\\)</span> and the task of the <span>\\(f\\)</span>-<span>Query</span> problem is to compute integer <span>\\((g \\mathbin {\\circledast _{f}}h)(\\textbf{v})\\)</span>. This is a generalization of the well-known Orthogonal Vectors problem. We show that <span>\\(f\\)</span>-<span>Query</span> can be computed in <span>\\(\\widetilde{{\\mathcal {O}}}(|D|^{\\frac{\\omega }{2} n} \\cdot \\textrm{polylog}(M))\\)</span> time, where <span>\\(\\omega \\in [2,2.372)\\)</span> is the exponent of currently fastest matrix multiplication algorithm.</p></div>","PeriodicalId":50824,"journal":{"name":"Algorithmica","volume":"86 1","pages":"334 - 366"},"PeriodicalIF":0.9000,"publicationDate":"2023-10-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://link.springer.com/content/pdf/10.1007/s00453-023-01176-2.pdf","citationCount":"0","resultStr":"{\"title\":\"Computing Generalized Convolutions Faster Than Brute Force\",\"authors\":\"Barış Can Esmer,&nbsp;Ariel Kulik,&nbsp;Dániel Marx,&nbsp;Philipp Schepper,&nbsp;Karol Węgrzycki\",\"doi\":\"10.1007/s00453-023-01176-2\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>In this paper, we consider a general notion of convolution. Let <span>\\\\(D\\\\)</span> be a finite domain and let <span>\\\\(D^n\\\\)</span> be the set of <i>n</i>-length vectors (tuples) of <span>\\\\(D\\\\)</span>. Let <span>\\\\(f :D\\\\times D\\\\rightarrow D\\\\)</span> be a function and let <span>\\\\(\\\\oplus _f\\\\)</span> be a coordinate-wise application of <i>f</i>. The <span>\\\\(f\\\\)</span>-<span>Convolution</span> of two functions <span>\\\\(g,h :D^n \\\\rightarrow \\\\{-M,\\\\ldots ,M\\\\}\\\\)</span> is </p><div><div><span>$$\\\\begin{aligned} (g \\\\mathbin {\\\\circledast _{f}}h)(\\\\textbf{v}) {:}{=}\\\\sum _{\\\\begin{array}{c} \\\\textbf{v}_g,\\\\textbf{v}_h \\\\in D^n\\\\\\\\ \\\\text {s.t. } \\\\textbf{v}= \\\\textbf{v}_g \\\\oplus _f \\\\textbf{v}_h \\\\end{array}} g(\\\\textbf{v}_g) \\\\cdot h(\\\\textbf{v}_h) \\\\end{aligned}$$</span></div></div><p>for every <span>\\\\(\\\\textbf{v}\\\\in D^n\\\\)</span>. This problem generalizes many fundamental convolutions such as Subset Convolution, XOR Product, Covering Product or Packing Product, etc. For arbitrary function <i>f</i> and domain <span>\\\\(D\\\\)</span> we can compute <span>\\\\(f\\\\)</span>-<span>Convolution</span> via brute-force enumeration in <span>\\\\(\\\\widetilde{{\\\\mathcal {O}}}(|D|^{2n} \\\\cdot \\\\textrm{polylog}(M))\\\\)</span> time. Our main result is an improvement over this naive algorithm. We show that <span>\\\\(f\\\\)</span>-<span>Convolution</span> can be computed exactly in <span>\\\\(\\\\widetilde{{\\\\mathcal {O}}}( (c \\\\cdot |D|^2)^{n} \\\\cdot \\\\textrm{polylog}(M))\\\\)</span> for constant <span>\\\\(c {:}{=}3/4\\\\)</span> when <span>\\\\(D\\\\)</span> has even cardinality. Our main observation is that a <i>cyclic partition</i> of a function <span>\\\\(f :D\\\\times D\\\\rightarrow D\\\\)</span> can be used to speed up the computation of <span>\\\\(f\\\\)</span>-<span>Convolution</span>, and we show that an appropriate cyclic partition exists for every <i>f</i>. Furthermore, we demonstrate that a single entry of the <span>\\\\(f\\\\)</span>-<span>Convolution</span> can be computed more efficiently. In this variant, we are given two functions <span>\\\\(g,h :D^n \\\\rightarrow \\\\{-M,\\\\ldots ,M\\\\}\\\\)</span> alongside with a vector <span>\\\\(\\\\textbf{v}\\\\in D^n\\\\)</span> and the task of the <span>\\\\(f\\\\)</span>-<span>Query</span> problem is to compute integer <span>\\\\((g \\\\mathbin {\\\\circledast _{f}}h)(\\\\textbf{v})\\\\)</span>. This is a generalization of the well-known Orthogonal Vectors problem. We show that <span>\\\\(f\\\\)</span>-<span>Query</span> can be computed in <span>\\\\(\\\\widetilde{{\\\\mathcal {O}}}(|D|^{\\\\frac{\\\\omega }{2} n} \\\\cdot \\\\textrm{polylog}(M))\\\\)</span> time, where <span>\\\\(\\\\omega \\\\in [2,2.372)\\\\)</span> is the exponent of currently fastest matrix multiplication algorithm.</p></div>\",\"PeriodicalId\":50824,\"journal\":{\"name\":\"Algorithmica\",\"volume\":\"86 1\",\"pages\":\"334 - 366\"},\"PeriodicalIF\":0.9000,\"publicationDate\":\"2023-10-06\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://link.springer.com/content/pdf/10.1007/s00453-023-01176-2.pdf\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Algorithmica\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://link.springer.com/article/10.1007/s00453-023-01176-2\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q4\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Algorithmica","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s00453-023-01176-2","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

摘要

在本文中,我们将考虑卷积的一般概念。让 \(D\) 是一个有限域,让 \(D^n\) 是 \(D\) 的 n 长向量(元组)的集合。让 \(f :D\times D\rightarrow D\) 是一个函数,让 \(\oplus _f\)是 f 的坐标应用。两个函数 \(g,h :D^n \rightarrow \{-M,\ldots ,M\}\) 的 \(f\)-Convolution 是 $$\begin{aligned} (g \mathbin {\circledast _{f}}h)(\textbf{v}) {:}{=}\sum _{\begin{array}{c}.\in D^n\\text {s.t. }\textbf{v}= \textbf{v}_g \oplus _f \textbf{v}_h \end{array}} g(\textbf{v}_g) \cdot h(\textbf{v}_h) \end{aligned}$$ 对于每一个 \(\textbf{v}\in D^n\).这个问题概括了许多基本卷积,例如子集卷积、XOR 积、覆盖积或打包积等。对于任意函数 f 和域 \(D\),我们可以在 \(\widetilde{{\mathcal {O}}}(|D|^{2n}) 中通过暴力枚举来计算 \(f\)-Convolution\时间)。我们的主要结果是对这一天真算法的改进。我们证明了 \(f\)-Convolution 可以在 \(widetilde{{mathcal {O}}( (c \cdot |D|^2)^{n}) 时间内精确计算。当 \(D\) 具有偶数卡片数时,对于常数 \(c {:}{=}3/4\) 来说,(\cdot \textrm{polylog}(M))\) 是常数。我们的主要观点是,函数 \(f :D\times D\rightarrow D\) 的循环分区可以用来加快 \(f\)-Convolution 的计算速度,而且我们证明了对于每个 f 都存在一个合适的循环分区。在这个变体中,我们给定了两个函数(g,h :D^n \rightarrow \{-M,\ldots ,M\}\)以及一个向量(D^n\中的\textbf{v}),而\(f\)-查询问题的任务就是计算整数((g \mathbin {\circledast _{f}}h)(\textbf{v})\ )。这是著名的正交向量问题的一般化。我们证明了 \(f\)-Query 可以在 \(\widetilde{\mathcal {O}}}(|D|^{frac\{omega }{2} n} 中计算。\cdot \textrm{polylog}(M))\) time,其中 \(\omega \in [2,2.372)\) 是当前最快矩阵乘法算法的指数。
本文章由计算机程序翻译,如有差异,请以英文原文为准。

摘要图片

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Computing Generalized Convolutions Faster Than Brute Force

In this paper, we consider a general notion of convolution. Let \(D\) be a finite domain and let \(D^n\) be the set of n-length vectors (tuples) of \(D\). Let \(f :D\times D\rightarrow D\) be a function and let \(\oplus _f\) be a coordinate-wise application of f. The \(f\)-Convolution of two functions \(g,h :D^n \rightarrow \{-M,\ldots ,M\}\) is

$$\begin{aligned} (g \mathbin {\circledast _{f}}h)(\textbf{v}) {:}{=}\sum _{\begin{array}{c} \textbf{v}_g,\textbf{v}_h \in D^n\\ \text {s.t. } \textbf{v}= \textbf{v}_g \oplus _f \textbf{v}_h \end{array}} g(\textbf{v}_g) \cdot h(\textbf{v}_h) \end{aligned}$$

for every \(\textbf{v}\in D^n\). This problem generalizes many fundamental convolutions such as Subset Convolution, XOR Product, Covering Product or Packing Product, etc. For arbitrary function f and domain \(D\) we can compute \(f\)-Convolution via brute-force enumeration in \(\widetilde{{\mathcal {O}}}(|D|^{2n} \cdot \textrm{polylog}(M))\) time. Our main result is an improvement over this naive algorithm. We show that \(f\)-Convolution can be computed exactly in \(\widetilde{{\mathcal {O}}}( (c \cdot |D|^2)^{n} \cdot \textrm{polylog}(M))\) for constant \(c {:}{=}3/4\) when \(D\) has even cardinality. Our main observation is that a cyclic partition of a function \(f :D\times D\rightarrow D\) can be used to speed up the computation of \(f\)-Convolution, and we show that an appropriate cyclic partition exists for every f. Furthermore, we demonstrate that a single entry of the \(f\)-Convolution can be computed more efficiently. In this variant, we are given two functions \(g,h :D^n \rightarrow \{-M,\ldots ,M\}\) alongside with a vector \(\textbf{v}\in D^n\) and the task of the \(f\)-Query problem is to compute integer \((g \mathbin {\circledast _{f}}h)(\textbf{v})\). This is a generalization of the well-known Orthogonal Vectors problem. We show that \(f\)-Query can be computed in \(\widetilde{{\mathcal {O}}}(|D|^{\frac{\omega }{2} n} \cdot \textrm{polylog}(M))\) time, where \(\omega \in [2,2.372)\) is the exponent of currently fastest matrix multiplication algorithm.

求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Algorithmica
Algorithmica 工程技术-计算机:软件工程
CiteScore
2.80
自引率
9.10%
发文量
158
审稿时长
12 months
期刊介绍: Algorithmica is an international journal which publishes theoretical papers on algorithms that address problems arising in practical areas, and experimental papers of general appeal for practical importance or techniques. The development of algorithms is an integral part of computer science. The increasing complexity and scope of computer applications makes the design of efficient algorithms essential. Algorithmica covers algorithms in applied areas such as: VLSI, distributed computing, parallel processing, automated design, robotics, graphics, data base design, software tools, as well as algorithms in fundamental areas such as sorting, searching, data structures, computational geometry, and linear programming. In addition, the journal features two special sections: Application Experience, presenting findings obtained from applications of theoretical results to practical situations, and Problems, offering short papers presenting problems on selected topics of computer science.
期刊最新文献
Energy Constrained Depth First Search Recovering the Original Simplicity: Succinct and Exact Quantum Algorithm for the Welded Tree Problem Permutation-constrained Common String Partitions with Applications Reachability of Fair Allocations via Sequential Exchanges On Flipping the Fréchet Distance
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1