Minkowski 정수의 목격자에서 증인 찾기


16

하자 와 B는 의 부분 집합이 될 { 0 , ... , N } . 우리는 Minkowski 합계 A + B = { a + b | a A , b B } .AB{0,,n}  A+B={a+b | aA,bB}

χ X : { 0 , ... , 2 N } { 0 , 1 }χX:{0,,2n}{0,1} 의 특성 함수 X는X 경우 χ X ( X ) = { 1  경우  X X 0  그렇지

χX(x)={1 if xX0 otherwise

하자 f는f 이산 컨벌루션 될 χχAχ BχBX + BxA+B 의 경우에만 F ( X ) > 0f(x)>0 . 따라서 A + BA+B 는 FFT를 통한 이산 컨벌루션에 의해 O ( n log n )O(nlogn) 시간 내에 계산 될 수 있습니다 .

때때로 x에 합한 실제 쌍 a AaAb B 를 찾아야합니다 . A는 착신되는 증거X가 존재하는 경우, (B) B 되도록 + B = X를 . 함수 w : + B A는 불리며 감시 기능을 한다면 w ( x가 ) 의 증거이며 , X는 .bBxaAxbBa+b=xw:A+BAw(x)x

O ( n log n ) 에서 감시 기능을 계산할 수 있습니까?O(nlogn) 시간에 있습니까?


3
O ( n p o l y l o g n ) 는 특별히 단단하지 않다. O(npolylogn)
Sariel Har

2
이진 검색을 사용할 수 있습니다. 예를 들어, A 를 두 개의 대략 동일한 크기의 세트 A L , A R 로 분할 하고 A L + BA R + B를 계산합니다 . 그 x 중 어느 것이 있는지 확인하십시오 . 그리고 재귀. 이것은 O ( n lg 2 n ) 와 같은 것을 얻게됩니다 . AAL,ARAL+BAR+BxO(nlg2n)
DW

@DW 단일 x에 대한 증인 만 찾을 수 있지만 A + B의 각 요소에 대한 증인을 원합니다 . (제 말이 명확하지 않은 것 같습니다. 방금 질문을 업데이트했습니다)xA+B
Chao Xu

그러나 O (n polylog n) 솔루션에 관심이 있습니까?
Sariel

@ SarielHar-Peled 예, 결정 론적 O ( n p o l y l o g n ) 알고리즘 에도 관심이 있습니다. O(npolylogn)
Chao Xu

답변:


11

Here I am explaining how to get O(npolylogn)O(npolylogn) randomized running time. We need a sequence of observations:

  1. A witness of a value vv is a pair of numbers (a,b)A×B(a,b)A×B such that a+b=va+b=v. Let PA(x)=iAxiPA(x)=iAxi and PB(x)PB(x) be defined analogously. Observe that the coefficient of xvxv in PA(x)PB(x)PA(x)PB(x) is the number of witnesses there are for the value vv.

  2. Assume vv has a single witness (a,b)A×B(a,b)A×B, and consider the the polynomial QA(x)=iAixiQA(x)=iAixi. Clearly, the coefficient of xvxv in QA(x)PB(x)QA(x)PB(x) is aa, and as such we now know the pair (a,va)(a,va) and we are done.

  3. So, we are done with the case that there is a single witness. So consider the case that vv has kk witnesses (a1,b1),,(ak,bk)(a1,b1),,(ak,bk). Let i(k)=lgki(k)=lgk. Observe that 2i(k)1k2i(k)2i(k)1k2i(k). Next, let Rj=(Aj,Bj)Rj=(Aj,Bj), for j=1,,mj=1,,m, for m=O(logn)m=O(logn) be random samples, such that each element of AA is choosen into AiAi with probability p=1/2i(k)p=1/2i(k). The probability that vv has a single witness in RjRj is α=(k1)p2(1p2)k1α=(k1)p2(1p2)k1, since the witness are disjoint pairs of numbers (since the sum of each pair is vv). It is easy to verify that αα is a constant in (0,1)(0,1) independent of the value of kk. As such, it must be, with high probability, that vv has a single witness in one of the samples R1,,RmR1,,Rm. As such, by computing the two polynomials associated with with such sample, as described above, in O(nlogn)O(nlogn) time (per sample), using FFT, we can decide this in constant time.

  4. We are almost done. Compute the above random samples for resolutions i=1,,lgni=1,,lgn. For each such resolution compute the random samples and associated polynomials. Also, compute the associated polynomial for AA and BB. This preprocessing naively takes O(nlog3n)O(nlog3n), but I suspect that being slightly more careful a lognlogn factor should be removable.

  5. The algorithm: For every value vv, compute how many witness, say k, it has in constant time, by consulting the polynomial QA(x)PB(x)QA(x)PB(x). Next, go to the relevant data-structure for i(k)i(k). Then, it finds the random sample that has it as a single witness, and it extract the pair that is this witness in constant time.

  6. Strangely enough, the preprocessing time is O(nlog3n)O(nlog3n), but the expected time to find the witness themselves take only O(n)O(n) time, since one can stop the search as soon as one find a witness. This suggests that this algorithm should be improveable. In particular, for i(k)lgni(k)lgn, the polynomials generated are very sparse, and one should be able to do much faster FFT.


12

Ok, I've been holding off since really Sariel should get credit for an answer, but I'm tired of waiting, so here is my cut at a near-linear randomized algorithm.

  • By choosing samples of n(1ϵ)in(1ϵ)i points, i=0,1,i=0,1,, you can get a logarithmic number of subproblems such that each sum from the original problem has constant probability of being represented uniquely in one of the subproblems (the one where the sampling cuts down the expected number of representations to near 1).
  • By repeating the sampling process a logarithmic number of times you can get all sums to have unique representations with high probability.
  • If you have a partition of AA and BB into two subsets, then by multiplying the numbers by four, adding 2 to the numbers in one of the subsets in AA, and adding 1 to the numbers in one of the subsets in BB, you can read off from the mod-4 values of the achievable sums which of the two subsets their summands come from.
  • By repeating the partition process a logarithmic number of times, using each bit position of the binary representations of the values or indices in the subproblems to select the partitions in each step, you can uniquely identify the summands of every uniquely-represented sum.

This blows up the running time by three logarithmic factors; probably that can be reduced.


3
Ha ha ;). I was in the middle of writing it, and then went to lunch...
Sariel Har-Peled

5

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.

  1. Size(Q)Size(Q) returns (|S1Q|,|S2Q|,,|SnQ|)(|S1Q|,|S2Q|,,|SnQ|), the size of each intersection.
  2. Sum(Q)Sum(Q) returns (sS1Qs,sS2Qs,,sSnQs)(sS1Qs,sS2Qs,,sSnQs), the sum of elements in each intersection.

The kk-reconstruction problem asks one to find nn subsets S1,,SnS1,,Sn such that SiSiSiSi and |Si|=min(k,|Si|)|Si|=min(k,|Si|) for all ii.

Let ff be the running time of calling the oracles, and assume f=Ω(m+n)f=Ω(m+n), then one can find the sets in deterministic O(fklogn polylog(m))O(fklogn polylog(m)) time. [1]

Now we can reduce the finding witness problem to 11-reconstruction problem. Here S1,,S2n{1,,2n}S1,,S2n{1,,2n} where Si={a|a+b=i,aA,bB}Si={a|a+b=i,aA,bB}.

Define the polynomials χQ(x)=iQxiχQ(x)=iQxi, IQ(x)=iQixiIQ(x)=iQixi

The coefficient for xi in χQχB(x) is |SiQ| and in IQχB(x) is sSiQs. 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)

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.