This answer gives a determinstic O(n polylogn)O(n polylogn) algorithm.
It appears that Sariel and David's algorithm can be derandomized through an approach similar to this paper. [2] While going through the process I found there is a more general problem that implies this result.
The kk-reconstruction problem
There are hidden sets S1,…,Sn⊂{1,…,m}S1,…,Sn⊂{1,…,m}, we have two
oracles SizeSize and SumSum that take a query set QQ.
- Size(Q)Size(Q) returns (|S1∩Q|,|S2∩Q|,…,|Sn∩Q|)(|S1∩Q|,|S2∩Q|,…,|Sn∩Q|), the size of each intersection.
- Sum(Q)Sum(Q) returns (∑s∈S1∩Qs,∑s∈S2∩Qs,…,∑s∈Sn∩Qs)(∑s∈S1∩Qs,∑s∈S2∩Qs,…,∑s∈Sn∩Qs), the sum of elements in each intersection.
The kk-reconstruction problem asks one to find nn subsets S′1,…,S′n such
that S′i⊂Si and |S′i|=min(k,|Si|) for all i.
Let f be the running time of calling the oracles, and assume f=Ω(m+n), then one can find the sets in deterministic O(fklogn polylog(m)) time. [1]
Now we can reduce the finding witness problem to 1-reconstruction problem. Here S1,…,S2n⊂{1,…,2n} where Si={a|a+b=i,a∈A,b∈B}.
Define the polynomials χQ(x)=∑i∈Qxi, IQ(x)=∑i∈Qixi
The coefficient for xi in χQχB(x) is |Si∩Q| and in IQχB(x) is ∑s∈Si∩Qs. Hence the oracles take O(nlogn) time per call.
This gives us an O(n polylog(n)) time deterministic algorithm.
[1] Yonatan Aumann, Moshe Lewenstein, Noa Lewenstein, Dekel Tsur:
Finding witnesses by peeling. ACM Transactions on Algorithms 7(2): 24 (2011)
[2] Noga Alon, Moni Naor: Derandomization, witnesses for Boolean matrix multiplication and construction of perfect hash functions. Algorithmica 16(4-5) (1996)