A Subquadratic Algorithm for 3XOR

04/30/2018
by   Martin Dietzfelbinger, et al.
0

Given a set X of n binary words of equal length w, the 3XOR problem asks for three elements a, b, c ∈ X such that a ⊕ b=c, where ⊕ denotes the bitwise XOR operation. The problem can be easily solved on a word RAM with word length w in time O(n^2 n). Using Han's fast integer sorting algorithm (2002/2004) this can be reduced to O(n^2 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 ⊕ X in ascending order for arbitrary a∈{0, 1}^w in linear time. Furthermore, we describe a randomized algorithm for 3XOR with expected running time O(n^2·{^3w/w, (n)^2/^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).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/15/2018

A Faster FPTAS for #Knapsack

Given a set W = {w_1,..., w_n} of non-negative integer weights and an in...
research
08/24/2020

Fast and Simple Modular Subset Sum

We revisit the Subset Sum problem over the finite cyclic group ℤ_m for s...
research
07/15/2021

Deterministic and Las Vegas Algorithms for Sparse Nonnegative Convolution

Computing the convolution A⋆ B of two length-n integer vectors A,B is a ...
research
03/21/2023

Fast exact simulation of the first passage of a tempered stable subordinator across a non-increasing function

We construct a fast exact algorithm for the simulation of the first-pass...
research
01/05/2020

All non-trivial variants of 3-LDT are equivalent

The popular 3-SUM conjecture states that there is no strongly subquadrat...
research
07/18/2018

Deterministic oblivious distribution (and tight compaction) in linear time

In an array of N elements, M positions and M elements are "marked". We s...
research
02/24/2020

Upper Tail Analysis of Bucket Sort and Random Tries

Bucket Sort is known to run in expected linear time when the input keys ...

Please sign up or login with your details

Forgot password? Click here to reset