arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1804.11086cs.DS
收藏

3XOR的次二次算法

A Subquadratic Algorithm for 3XOR

Martin Dietzfelbinger, Philipp Schlag, Stefan Walzer

摘要:

给定具有相等长度$w$的$n$二进制字的集合$X$,3XOR问题要求三个元素$a, b, c \in X$,使得$a \oplus b=c$,其中$ \oplus$表示逐位XOR操作。在字长为$w$ in time的字RAM上,这个问题可以很容易地解决$O(n^2 \log{n})$。使用Han的快速整数排序算法(2002/2004),这可以简化为$O(n^2 \log{\log{n}})$。通过随机化或复杂的确定性字典构造,为具有恒定查找时间的$X$创建哈希表会导致具有(预期)运行时间$O(n^2)$的算法。目前,似乎还没有更快的算法。我们提出了一个令人惊讶的简单的确定性,二次时间算法3XOR。它的核心是$X$的Patricia trie的一个版本,这使得可以在线性时间内以升序遍历集合$a \oplus X$,以获得任意$a\in \{0, 1\}^{w}$。此外,我们描述了一个随机算法的3异或预期运行时间$O(n^2\cdot\min\{\log^3{w}/w, (\log\log{n})^2/\log^2 n\})$。该算法将Baran,Demaine和Ptrajeccu(2005/2008)用于在预期时间$o(n^2)$内解决相关int 3SUM问题(用整数加法代替二进制XOR的相同问题)的技术转移到我们的设置中。正如Jafargholi和Viola(2016)所建议的那样,使用线性哈希函数。后者的作者还表明,假设3XOR需要预期的运行时间$n^{2-o(1)}$可以证明三角枚举的条件下界,就像3SUM一样。我们证明了3XOR也可以简化为其他问题,处理离线SetDisjointness和离线SetIntersection的示例,这些示例由Kopelowitz,Pettie和Porat(2016)为3SUM进行了研究。

英文摘要:

Given a set $X$ of $n$ binary words of equal length $w$, the 3XOR problem asks for three elements $a, b, c \in X$ such that $a \oplus b=c$, where $ \oplus$ denotes the bitwise XOR operation. The problem can be easily solved on a word RAM with word length $w$ in time $O(n^2 \log{n})$. Using Han's fast integer sorting algorithm (2002/2004) this can be reduced to $O(n^2 \log{\log{n}})$. With randomization or a sophisticated deterministic dictionary construction, creating a hash table for $X$ with constant lookup time leads to an algorithm with (expected) running time $O(n^2)$. At present, seemingly no faster algorithms are known. We present a surprisingly simple deterministic, quadratic time algorithm for 3XOR. Its core is a version of the Patricia trie for $X$, which makes it possible to traverse the set $a \oplus X$ in ascending order for arbitrary $a\in \{0, 1\}^{w}$ in linear time. Furthermore, we describe a randomized algorithm for 3XOR with expected running time $O(n^2\cdot\min\{\log^3{w}/w, (\log\log{n})^2/\log^2 n\})$. The algorithm transfers techniques to our setting that were used by Baran, Demaine, and Pătraşcu (2005/2008) for solving the related int3SUM problem (the same problem with integer addition in place of binary XOR) in expected time $o(n^2)$. As suggested by Jafargholi and Viola (2016), linear hash functions are employed. The latter authors also showed that assuming 3XOR needs expected running time $n^{2-o(1)}$ one can prove conditional lower bounds for triangle enumeration just as with 3SUM. We demonstrate that 3XOR can be reduced to other problems as well, treating the examples offline SetDisjointness and offline SetIntersection, which were studied for 3SUM by Kopelowitz, Pettie, and Porat (2016).

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

↑