完全に均一にmod 3を高速で生成するか、NP問題を解決できますか?


13

正直に言うと、私は(!コメントは歓迎されている)が生成される方法を乱数についてその多くを知っているが聞かせていないのは、以下の理論モデルを前提としています。私たちは、より均一にランダムな整数を得ることができます[ 1 2 のn ][1,2n]と私たちの目標は、出力にあります[1,3]から一様にランダムな整数。

2n2n1[1,2n]3mod 3mod3

しかし、多項式時間で確実に終了したい場合はどうでしょうか?可分性の問題のため、問題は解決できなくなります。しかし、私は次のことを解決できるかどうか疑問に思います。

から一様にランダムに整数を生成でき、計算が難しい問題が与えられたとします。私たちの目標は、[1,3]から一様にランダムな整数を出力するか、難しい問題を解決することです。[ 1 2 N ][1,2n]

ここで難しい問題は、整数の因数分解、SATインスタンスの解決などです。例えば、我々は一方通行の順列デコードすることができ次のように我々はいくつか与えられている場合には、(と仮定、当社のランダムな文字列のための場合:さえある)、その後、取る、場合、ます。最後に、場合、として完了です。(が奇数の場合、同様のことが機能しますかどう確認し、場合はを減算する必要があります。)f ff x f(x)n nf r < f x f(r)<f(x)f r mod 3 f(r)mod3f r > f x f(r)>f(x)f r 1 mod 3 f(r)1mod3f r = f x f(r)=f(x)r = x r=xn nf r + 1 = f xf(r+1)=f(x)2 2f r > f x f(r)>f(x)

回答の要約。 EmilJeřábekは、完全に均一に生成できない限り、TFNPおよびPPA-3から単一値の検索問題を解決できることを示しました。一方、danielloは、NP = co-NPでない限り、上記の方法でNP完全問題を解決できないことを示しています。


@Tayfun nnが偶数の場合、2 n12n133で割り切れる必要があります。nnが奇数の場合、2 n22n23で割り切れる必要があり3ます。あなたが私がどの部分についてより具体的にすべきかについて、より具体的になれば幸いです。
-domotorp

(1)TFNPの(単一値の)関数を解くための片方向置換で例を一般化できます。(2)PPA-3の任意の検索問題を解決できます。
エミルイェジャベク3.0

@Emil(1):どうやって?(2):私はこれが適切な複雑さのクラスかもしれないと考えましたが、なぜそのような問題を解決できるのかわかりません。
-domotorp

後で答えとして書き上げます。ところで、質問は面白いです、私はすべてのdownvotesとの取り引きが何であるかわかりません。
エミルイェジャベク3.0

2
ダウン投票は奇妙です。これはとてもクールな質問です!そして、私はそれについて不明確なものは何も見ない。
サショニコロフ

回答:


6

domotorpの答えのフォローアップとして、次の制限のいずれかを満たすNP検索問題を解決できると思います。

  1. 解の数は既知であり、3で割り切れません3。または、

  2. 解の数は多項式で区切られています(ただし、事前にはわかりません)。

1.の場合、単純なパディングを使用して、次のケースに減らすことができます。

  • 溶液からである[ 0 2 M - 1[0,2m1)mはm偶数です。

  • ソリューションの数Ssを満たすS 1mod3 s1(mod3)

  • 2つのソリューションは、少なくとも4の距離が4離れています。(言う、それらはすべて4で割り切れ4ます。)

3 2 msであることに注意してください32ms。そこで、ランダム選択することによって問題を解決することができ、A [ 0 2 メートルa[0,2m)場合、ユニークなソリューションのための私の答えと同様のプロトコルを使用して[ 0 2 m個 - S に分布が生じます({ 0 1 2 }一方の短0の各々につきSの溶液)、及び出力0を場合[a[0,2ms){0,1,2}0s02ms 2 ma[2ms,2m)

2.ために、ソリューションの数という最初の仮定S PはN sp(n)されている既知の。以下のよう/cstheory//a/37546、聞かせて3 kは3k最大の力である33分割そのSsように、3 S3 ky0<y1<<y3k1であり、各yiが元の問題の解であるようなシーケンスy0y3k-1である解の探索問題を考えてください。一方で、元の問題は新しい問題に還元されます。一方、新しい問題の解決策の数はs3(s3k)y0,,y3k1y0<y1<<y3k1yi3 k、つまり3で割り切れず、既知です。したがって、1で完了です。(s3k)3

ソリューションの数はで囲まれている場合今、P N が、知られていない、我々は上記プロトコル実行2 ℓの時間(2 P N のそれぞれの可能な選択のために並列で)を1 S 2 、そして:p(n)22p(n)1s2

  • スレッドのいずれかが元の問題の解決策を返す場合、そのようなものを出力に渡します。

  • すべてのスレッドが要素が返す場合rは1... R 2 ℓは{ 0 1 2 }、我々の出力は、R 1 + R 2 + + R 2 )は、国防省3r1,,r2{0,1,2}(r1+r2++r2)mod3

第2のイベントを条件と、R Sが均一に分布している{ 0 1 2 }のためにsが他のながら、元の問題の解の真数でR iは独立しているR sは、それ故に全体和は均一でもあります配布されました。rs{0,1,2}srirs


1と2の一般的な一般化は、解の数が多項式時間で計算可能な数のリストに由来するため、それらのいずれかを除算する3の最大の累乗が多項式的に制限されることです。3
エミールイェジャベク3.0

ところで、解の数が3の超多項式力で割り切れることが証明できる非複合問題を知っていますか?複合とは、解の数が3で割り切れるいくつかの問題の直接積をとるようなものを意味します。複合問題は上記の方法で簡単に解決できます。33
-domotorp

3つの問題の超多項式力が上記の方法で解決できないオラクルがあることを証明することは可能だと思います。
-domotorp

@domotorpそれは面白いです。私は、ある種のValiant–Vaziraniの議論を使って任意のTFNP問題を解決できる可能性を楽しませていました。とにかく、特性評価はまだ不完全です。解の数がわかっているか、少なくとも多項式時間で構成可能なリストに由来するというこの回答の制限について特に不満です。ひとつには、そのような問題のクラスは、明らかに他の回答のPPA-3とは比べ物にならないので、両方を一般化する構成があればよいでしょう。AFAICS唯一の上限は、解決可能な問題があることです...
エミルイェジャベク3.0

... in the above way is reducible to a TFNP problem whose number of solutions is 11 modulo 33 (but not known). It’s not clear to me whether to expect that this is the right class, or whether some additional restriction is needed after all.
Emil Jeřábek 3.0

10

I will use numbers starting from 00 rather than 11, as I find it much more natural.

Here are two classes of problems we can solve in this way:

  1. Functions in TFNP (i.e., single-valued total NP search problems)

    (This generalizes the example with one-way permutations. It includes as a special case decision problems from UPcoUPUPcoUP.)

    The setup is that we have a polynomial-time predicate R(x,y)R(x,y), and a polynomial p(n)p(n) such that for every xx of length nn, there exists a unique yy of length m=p(n)m=p(n) such that R(x,y)R(x,y) holds. The computational task is, given xx, find yy.

    Now, I will assume wlog that mm is even, so that 2m1(mod3)2m1(mod3). The algorithm is to generate a uniformly random y[0,2m)y[0,2m), and output

    • yy (as a solution of the search problem) if R(x,y)R(x,y);

    • yyyy (as a random element of {0,1,2}{0,1,2}) if yy{1,2}yy{1,2}, and R(x,y)R(x,y);

    • ymod3ymod3 (as a random element of {0,1,2}{0,1,2}) if no y{y,y1,y2}y{y,y1,y2} solves R(x,y)R(x,y).

    If there were no solution of the search problem, the 2m2m random choices would give 11 and 22 (2m1)/3(2m1)/3 times, and 00 (2m+2)/3(2m+2)/3 times (one more). However, if yy solves the search problem, we tinkered with the elements y,y+1,y+2y,y+1,y+2 (which hit all three residue classes) so that they only produce residues 11 and 22, which evens out the advantage of 00. (I am assuming here wlog that y<2m2y<2m2.)

  2. PPA-33 search problems

    A convenient way to define PPA-33 is as NP search problems many-one reducible to the following kind of problems. We have a fixed polynomial-time function f(x,y)f(x,y), and a polynomial p(n)p(n), such that for any input xx of length nn, the induced mapping fx(y)=f(x,y)fx(y)=f(x,y) restricted to inputs yy of length m=p(n)m=p(n) is a function fx:[0,2m)[0,2m)fx:[0,2m)[0,2m) satisfying fx(fx(fx(y)))=yfx(fx(fx(y)))=y for every yy. The task is, given xx, find a fixpoint yy of fxfx: fx(y)=yfx(y)=y.

    We can solve this in the way in the question as follows: given xx of length nn, we generate a random yy of length m=p(n)m=p(n), and output

    • yy if it is a fixpoint of fxfx;

    • otherwise, yy, fx(y)fx(y), and fx(fx(y))fx(fx(y)) are distinct elements. We can label them as {y,fx(y),fx(fx(y))}={y0,y1,y2}{y,fx(y),fx(fx(y))}={y0,y1,y2} with y0<y1<y2y0<y1<y2, and output i{0,1,2}i{0,1,2} such that y=yiy=yi.

    It is clear from the definitions that this gives a uniform distribution on {0,1,2}{0,1,2}, as the non-fixpoint yy's come in triples.


Let me show for the record the equivalence of the problem above with Papadimitriou’s complete problem for PPA-33, as this class is mostly neglected in the literature. The problem is mentioned in Buss, Johnson: “Propositional proofs and reductions between NP search problems”, but they do not state the equivalence. For PPA, a similar problem (LONELY) is given in Beame, Cook, Edmonds, Impagliazzo, and Pitassi: “The relative complexity of NP search problems”. There is nothing special about 33, the argument below works mutatis mutandis for any odd prime.

Proposition: The following NP search problems are poly-time many-one reducible to each other:

  1. Given a circuit representing a bipartite undirected graph (AB,E)(AB,E), and a vertex uABuAB whose degree is not divisible by 33, find another such vertex.

  2. Given a circuit representing a directed graph (V,E)(V,E), and a vertex uVuV whose degree balance (i.e., out-degree minus in-degree) is not divisible by 33, find another such vertex.

  3. Given a circuit computing a function f:[0,2n)[0,2n)f:[0,2n)[0,2n) such that f3=idf3=id, find a fixpoint of ff.

Proof:

1p21p2 is obvious, as it suffices to direct the edges from left to right.

2p12p1: First, let us construct a weighted bipartite graph. Let AA and BB be copies of VV: A={xA:xV}A={xA:xV}, B={xB:xV}B={xB:xV}. For each original edge xyxy, we put in an edge {xA,yB} of weight 1, and an edge {xB,yA} of weight 1. This makes deg(xA)=deg(xB) equal to the degree balance of x in the original graph. If u is the given vertex of balance b0(mod3), we add an extra edge {uA,uB} of weight b, so that deg(uA)=2b0(mod3), and deg(uB)=0. uA will be our chosen vertex.

In order to make the graph a plain unweighted undirected graph, we first reduce all weights modulo 3, and drop all edges of weight 0. This leaves only edges of weights 1 and 2. The latter can be replaced with suitable gadgets. For example, instead of a weight-2 edge {xA,yB}, we include new vertices wAi, zBi for i=0,,3, with edges {xA,yB}, {xA,zBi}, {wAi,yB}, {wAi,zBi}, {wAi,zB(i+1)mod4}: this makes deg(wAi)=deg(zBi)=3, and contributes 52(mod3) to xA and yB.

3p2: Let me assume for simplicity n is even so that 2n1(mod3). We construct a directed graph on V=[0,2n) as follows:

  • We include edges 3x+13x and 3x+23x for each x<2n/31.

  • If x0<x1<x2 is a non-fixpoint orbit of f, we include edges x0x1 and x0x2.

The chosen vertex will be u=2n1. The first clause contributes balance 1 or 21(mod3) to each vertex u. Likewise, the second clause contributes balance 1 or 21(mod3) to vertices that are not fixpoints. Thus, assuming u is not already a fixpoint, it is indeed unbalanced modulo 3, and any other vertex unbalanced modulo 3 is a fixpoint of f.

1p3: We may assume that A=B=[0,2n) with n even, and the given vertex uA has degree 2(mod3).

We can efficiently label edges incident with a vertex yB as (y,j), where j<deg(y). In this way, E becomes a subset of [0,2n)×[0,2n), which we identify with [0,22n). We define a function f on [0,2n)×[0,2n) as follows.

  • On the complement of E: for each yB, and j such that deg(y)3j<2n1, we make f(y,3j)=(y,3j+1), f(y,3j+1)=(y,3j+2), f(y,3j+2)=(y,3j). Also, f(3i,2n1)=(3i+1,2n1), f(3i+1,2n1)=(3i+2,2n1), f(3i+2,2n1)=(3i,2n1) for 3i<2n1. This leaves out the point (2n1,2n1), and 3(deg(y)mod3) points (y,i) for each yB whose degree is not divisible by 3.

  • On E: for each xA, we fix an efficient enumeration of its incident edges (y0,j0),,(yd1,jd1), where d=deg(x). We put f(y3i,j3i)=(y3i+1,j3i+1), f(y3i+1,j3i+1)=(y3i+2,j3i+2), f(y3i+2,j3i+2)=(y3i,j3i) for i<d/3. This leaves out deg(x)mod3 points for each vertex xA whose degree is not divisible by 3.

Since deg(u)2(mod3), two of its incident edges were left out; we make them into yet another f cycle using (2n1,2n1) as the third point. The remaining points are left as fixpoints of f. By construction, any of them will give rise to a solution of (1).


1
Both solutions are correct, but I have a problem with the definitions of the classes. In the definition of TFNP, usually at least one solution is required to exist, while you want exactly one, which would be TFUP, I guess. PPA-3 is originally defined with input a bipartite graph and a given vertex whose degree is not 3, and we need to find another such vertex. Your example with f is obviously in this class, but why is it complete for it? (This might be well-known, but it's new to me.)
domotorp

1
(1) I stressed very explicitly that the result does not apply to arbitrary TFNP search problems, but only to functions. I really don’t know how to make it even more clear. (2) Yes, this is equivalent to the usual definition of PPA-3. This shouldn’t be difficult to show.
Emil Jeřábek 3.0

(1) Sorry, here my confusion was only linguistic; in your original comment you've indeed emphasized single valued, but in your answer you wrote just TFNP functions, and then added in parenthesis the "i.e." which makes equivalent as far as I know. I think it would be easier to understand if you wrote "single-valued TFNP functions" in your answer too.
domotorp

(2) This equivalence would be very surprising. With a similar trick that you've used in (1), it would imply that USAT is in PPA-3, wouldn't it? I would expect it more probable that my problem is related to some TFNP whose number of solutions is 1 or 2 mod 3 for each n (and we need to know which). Btw, your solution for (1) already implies that FullFactoring can be solved, which was my original motivation.
domotorp

Functions are single-valued. That's what function means. I'll try to look up the stuff on PPA-3. However, I don't see how it would include USAT. The construction in (1) does not produce a poly-time f with f3=id, or at least I don't see it: for the obvious choice, one cannot compute f(2m1) without solving the search problem first.
Emil Jeřábek 3.0

7

If you could perfectly generate mod 3 OR solve SAT (or any other NP-complete problem, for that matter) then NP=coNP. In particular, consider the perfect generator / solver when given a SAT formula ϕ.

Let (n) be the maximum number of random bits drawn by the generator on inputs of size n. Since the generator runs in polynomial time, (n) is polynomial. Since 2(n) is not divisible by 3 there must be some sequence of at most (n) coin tosses that will make the generator output a (correct) answer for ϕ. Thus, if ϕ is unsatisfiable, there is a set of coin tosses that make the generator say that ϕ is unsatisfiable. If ϕ is satisfiable then the generator will never wrongly claim that ϕ is unsatisfiable, no matter what the coins are. Thus, we have shown that the language UNSAT of unsatisfiable formulas is in NP, implying NP=coNP.


2
In other words: whatever we can solve in this way is reducible to a TFNP problem. So, rather than NP, we sould shoot for subclasses of TFNP.
Emil Jeřábek 3.0

Yes, although i'm not certain that uniqueness is necessary, or one can get away with something significantly weaker.
daniello

1
Uniqueness of what?
Emil Jeřábek 3.0

"The setup is that we have a polynomial-time predicate R(x,y), and a polynomial p(n) such that for every x of length n, there exists a unique y of length m=p(n) such that R(x,y) holds. The computational task is, given x, find y." I have a feeling that the number of y's not being divisible by 3 could be enough. [Just noticed domotorp's new answer]
daniello

3
Well, the first part of my answer is about search problems with a unique solution, but that of course is not necessary. Already the second part of my answer is about search problems with potentially many solutions. What I meant by my comment above is the simple observation that if A(x) is a randomized poly-time algorithm that either generates a uniformly random element of {0,1,2}, or solves a problem S, then “given x, compute a string of random bits that makes A solve S” is a TFNP problem, and S is reducible to it. No uniqueness involved.
Emil Jeřábek 3.0

4

So here is an extension of Emil's argument that shows that search problems where the number of solutions is 1, 2 or 4 (we do not need to know which) can be solved in the above way. I'm posting it as an answer because it's way too long for a comment and I hope that someone smarter than me can prove that in fact the number of solutions can be anything not divisible by 3.

Say that a random string r is close to a solution (i.e., to a y for which R(x,y) holds) if one of R(x,r), R(x,r+1), or R(x,r+2) holds. (For simplicity, suppose that y=0 and y=1 are not solutions.) In Emil's solution, it was enough to generate a random string r and output rmod3 except that we locally fiddle around at solutions; I don't go into details, see his answer. It is enough for us that if r is close to a solution, then we can kill an arbitrary numbermod3 by possibly outputting a solution so that for the rest of the r's the rmod3 function gives a perfectly uniform numbermod3.

Now, let us suppose that the number of solutions is 1 or 2 for any x. We generate two random strings of length n: r1 and r2. If at least one of them is not close to a solution, we output r1+r2mod3. For simplicity, suppose that n is even so that we have an extra 0 if we just did this, and also suppose that if there are two solutions, they are far. If r1 and r2 are both close to the same solution, we fiddle around so that we kill a 0. If r1 and r2 are close to different solutions, then if r1<r2, we fiddle around so that we kill a 1, and if r1>r2, we fiddle around so that we kill a 2. This way if there is only one solution, we kill exactly one 0, while if there are two solutions, we kill two 0's, and one 1 and one 2.

This argument cannot be extended to 3 solutions, but can be for 4, and from here I'll be very sketchy. Generate four random strings, r1,r2,r3,r4 and output r1+r2+r3+r4mod3 unless all of them are close to a solution. Again suppose that there's an extra 0 and solutions are always far. If all the ri's are close to the same solution, we fiddle around to kill a 0. If three of the ri's are close to the same solution that is smaller than the solution to which the fourth ri is close, we fiddle around to kill a 1. If three of the ri's are close to the same solution that is larger than the solution to which the fourth ri is close, we fiddle around to kill a 2. If all the ri's are close to a different solution, we kill three 0's. The correctness for one and two solutions is similar to the previous case. For four solutions, notice that we kill four+three 0's, six 1's and six 2's.

I think that the reasoning of the the last paragraph could be extended to any bounded number of solutions that is not divisible by 3 with some algebra. A more interesting question is whether there is a protocol that works for any number of solutions.

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.