1 / 76

Slides by Golan Weisz, Omer Ben Shalom Nir Ailon & Tal Moran

P/Poly. Slides by Golan Weisz, Omer Ben Shalom Nir Ailon & Tal Moran Adapted from Oded Goldreich’s course lecture notes by Moshe Lewenstien , Yehuda Lindell & Tamar Seeman. In This Lecture. The non-uniform polynomial time class ( P/Poly ) The two equivalent definitions for the class

Download Presentation

Slides by Golan Weisz, Omer Ben Shalom Nir Ailon & Tal Moran

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. P/Poly Slides by Golan Weisz, Omer Ben Shalom Nir Ailon & Tal Moran Adapted from Oded Goldreich’s course lecture notes by Moshe Lewenstien , Yehuda Lindell & Tamar Seeman

  2. In This Lecture • The non-uniform polynomial time class (P/Poly) • The two equivalent definitions for the class • The power of P/Poly • BPP is contained in P/Poly • P/Poly includes non recursive languages

  3. 8.1 What is P/Poly? • P/Polycomprise all languages accepted by TMs working with an external “advice” • Formally - LP/Poly if there exists a polynomial time two-input machine M and a sequence {an} of “advice” strings |an|p(n)s.t

  4. What is P/Poly? TM M Advice Answer Input If the advice were not polynomially bounded it could have been a lookup table for the language.

  5. P/Poly as Circuits ? An alternative def: • For L in P/Poly there is a sequence of circuits {Cn}, where Cn has n inputs and 1 output, its size is bounded by p(n), and: • Referred to as a non-uniform family of circuits. circuits for distinct n are not necessarily correlated

  6. Non-Uniform Circuits A family of circuits {Cn} where circuit Cn has n inputs and 1output. Circuit 2 Circuit 3 Circuit 1

  7. P/Poly def’s equivalent 8.1.1 • Circuit  TM w/advice • a family of circuits {Cn} deciding L s.t. |Cn| is poly-bounded. • For every n, use a standard circuit encoding for C|x| as advice • Have a TM simulate the circuit and accepts/rejects accordingly.

  8. P/Poly def’s equivalent (2) • TM w/advice  circuit • a TM taking advice {an} • Construct, given M(an,.) a circuit that, on input xof length n, outputs M(an,x) • Over all n’s we get a family of circuits, based on the advices

  9.  8.1.2 P/Poly and the P=NP ? • P P/poly- empty advice • If we find a languageLNPs.t.LP/Polywe would provePNP • P/PolyandNPboth use an external string for computation. How are they different? P/poly uses a universal witness an for all inputs of size n, while for NP there may be different witnesses for inputs of same size. For L in NP, any witness is rejected if xLFor P/poly, however, there can be bad advices!

  10.  8.2.4 The power of P/Poly (1) • Claim:BPP P/Poly • Proof:By simple amplification onBPPwe get that for anyx{0,1}n, the probability forMto err onx is < 2-2n Recall: In BPP, the computation uses a sequence r of poly(n) coin tosses.

  11. Overlapped, the black areas do not cover everything Boxes: x’s Black area: the “bad” r’s The black areas cover less than 1/4 of the boxes Apply Union Bound • Now, there are 2nx’s, for any x the probability of a bad r is at most 2-2n • Therefore, there exists at least 1 r which is good for all x’s. • To illustrate (n=2): Therefore there are r’s that are good for all x’s

  12.  8.2.3 The Extreme Power of P/Poly In fact P/Poly is even much stronger class • P/Polyincludes non-recursive languages!!!

  13. The power of P/Poly (3) Example: • All unary languages (subsets of{1}*)are inP/Poly:the advice string can be exactlyL(1n) and the machine checks if the input is unary. • Fact: There are non-recursive unary languages. Take {1index(x) | xL} where L is non-recursive

  14.  8.3 Uniform Families of Circuits • P/Poly includes non-recursive languages due to it being non-uniform, hence, there is no guarantee the advice is even computable • A more reasonable class of circuits is the uniform family of circuits

  15. Uniform Advice Def:A family of circuits{Cn} isuniformif there exists a poly-time TM Mthat generatesCnon input1n Thm:L isdecided by a uniform family of circuits iff L  P

  16. Simulation Proof: • If{Cn}is a uniform family of circuits decidingLandMis a TM as above,then on inputx • RunMto obtain Cn • Simulate Cn onxand output the outcome • The algorithm’s running time is polynomial

  17. Uniform Circuits Proof(other direction): • L is a language in P. So there is a poly-time machine M decidingL. • As in the proof of Cook’s theorem, a poly-time machine M’ , given input 1ncan construct a poly-size circuit simulating M on inputs of size n. • The family of circuits generated by M’ is uniform and decides L.

  18.  8.4 Sparse languages (1) Def:A languageSis sparse if there exists a polynomialP(.)s.t. for every n |S{0,1}n|  p(n) (That is, the language contains at most p(n) strings of length n) Claim: NPP/Polyiff for everyLNP, Lis Cook reducible to a sparse language Suffices to consider SAT as it is NP-complete

  19. Sparse languages (2) Proof: • SATP/Poly  SATis Cook reducible to a sparse language • FromP/Polydef, there exist a family of advice strings{an}s.t.n |an| ≤ q(n) • Let • Sin = 000…00011111…..1 • S = { 1n0Sin | n>0 and i ‘thbitof an is 1} • Sis actually a list of unary pointers to positions of“1”s in{an} S is sparse as n |S{0,1}n+q(n)+1|  |an|  q(n)

  20. Sparse languages (3) The reduction: • On input,reconstructanbyq(n)queries to an oracle forS of type1n0SinRunM(an,)thereby solvingSATin polynomial time • We showed a polynomial-time solution forSATusing anS-oracletherefore it is Cook reducible to the sparse languageS

  21. Sparse languages (4) Proof of other direction: • SATis Cook reducible to a sparse language impliesSATP/Poly •  an oracle machineMSwhich decidesSATin poly-timet(.)Mmakes at mostt(|x|)oracle queries of size t(|x|) • Constructanby concatenating all the strings of length t(n)inSinto a ‘table’, SinceSis sparse the total length ofanispoly(n). • The “advice machine” will takeanas advice and use it to simulate the oracle.

  22. 8.4.9 Sparse, Karp and P vs NP Claim: • P=NPiff every languageLin NPis Karp-reducible to a sparse language Proof: P=NP  Any L in NP is Karp-reducible to a sparse language Trivially Karp-reduce a language L in NP(=P) to the sparse language {0,1} using f is poly-time computable if P=NP

  23. guarded Sparse, Karp and P vs NP (2) (a weaker version) Proof of other direction: SATis Karp-reducible to a sparse langP=NP • Def of a guarded sparse language: • Sis guarded sparseifGs.tGis a sparse language inP andSG. • Remark:Any unary language is guarded by the language{1n |n>=0}(sparse and in P)

  24. Sparse, Karp and P vs NP(3) • Let f be the Karp-reduction of SAT to a guarded sparse language S. • Input: A Boolean formula =(x1,…,xn) • The strategy will be to compute  with a DFS on the tree of all possible assignments of ’s variables.

  25. Sparse, Karp and P vs NP (4) • Let: • We construct a tree with the ’s as nodes. Each node  has two children, 0and 1. The root is the empty assignment , and the leaves have a Boolean constant value.

  26. Sparse, Karp and P vs NP (5)  0= (0,x2,…,xn) 1= (1,x2,…,xn) 0 1 00 01 10 11 00

  27. P=NP using the Karp-reduction(5) • The algorithm will perform a DFS on the tree. • At each node  it will calculate x • The algorithm will backtrack from a node if either: • xG ( xS  SAT) • It backtracked from both child. of . Can be computed in poly-time because G is in P. In this case we add x to the set BG-S - xB ( xG-S  SAT)

  28. P=NP using the Karp-reduction(6) • The algorithm stops and accept if it reaches a leaf and verifies that the assignment satisfies  • The algorithm stops and rejects if it backtracks from both children of the root node. Complexity analysis: • Call a node “bad” if it does not lead to a satisfying assignment, but the algorithm proceeds to its descendants

  29. Sparse, Karp and P vs NP (7) The point is that by keeping the data structure B, we make sure that there is no more than a polynomial number of bad nodes: that number cannot exceed |G-S| which is polynomial due to G’s sparseness

  30. The DFS Algorithm Start:B<-Tree-Search() In case the above call was not halted, reject. Tree-Search(): if ||=n /* Leaf */ if  True halt and accept else return compute x=f() /* case not at a leaf */ if xG return if xB return Tree-Search(0)Tree-Search(1) add x to B /* in case we return from the recursions */ return

  31. Polynomial-time Hierarchy Slides by Golan Weisz && Omer Ben Shalom. Adapted from Oded Goldreich’s course lecture notes by Ronen Mizrahi

  32. Introduction • The Polynomial-time Hierarchy is an extension of the classes P/NP. • Two ways to define the class: • By generalizing the notion of Cook reduction. • By using logical quantifiers. • We show that this class also upper bounds the notion of ‘efficient computation’. • We find conditions for the hierarchy to collapse.

  33. PH def - by oracle machines (1) 9.1.1 • Basic definitions • MA- TMwith oracleA • L(MA) - the language of inputs accepted byMA • MA(x) – the output ofMAon inputx • L(MC) is defined as the set of languages accepted byMwith access to oracleAof classC.

  34. PH def - by oracle machines (2) • LC1C2There exists aTMof classC1with access to an oracle in classC2that acceptsL • Examples: • PC= Languages accepted by DTM with access to an oracle A in class C. • NPC= Languages accepted byNTMwith access to an oracleAin classC • BPPC=Languages accepted by a probabilisticTMwith access to an oracleAinC.

  35. PH def - by oracle machines (3) • We define by induction: • 1 := NP • i+1 := NPi • i := Coi • i+1:= Pi

  36. PH def - by oracle machines (4) • Proposition: • ii  i+1  i+1i+1 • Proof: • i i  i+1=pi( for example NPcoNP  pNP=2) • We have an oracle for L  i • Ask the oracle and return answer for i • Ask the oracle and return the opposite for i(which is co-i).

  37. PH def - by oracle machines (5) • pi   i+1i+1 • pi  NPi = i+1as anNP TM can compute anything aP TM machine can • Aspiis closed under complementation (any reply of the oracle can be reversed) then: L pi & pi i+1 Li+1 -

  38. ->9.1.2 PH def - by quantifiers (1) • We are building on one of the basic NP definition • A k-ary relation R is polynomially bounded if exists a polynomial P(.) s.t.(x1,x2,….,xk) [(x1,x2….,xk)R  i |xi|  p(|x1|) • Note that the polynomial condition here is that all variables are bounded by the x1which we define as the input

  39. PH def - by quantifiers (2) • Recall the Quantifier definition of NP:LNP if there exists a polynomially bounded relation RL, recognizable in poly-time, s.t xL iff y s.t (x,y)  RL

  40. PH def - by quantifiers (3) • One can now define 2i:L2iifexists a polynomially bounded, polynomial time recognizable, (i+1)-ary relation RL s.txL iff y1y2y3..Qiyi s.t (x,y1,…,yi)RL • Qiis“” if i is even and “” if odd

  41. ->9.1.3 PH def equivalent (side 1) • We prove2i 1i by induction • (base) For i=1 both are NP. • Assume 2i 1i, prove 2i+1 1i+1: • The i+1st quantifiers can be viewed as (y1)+ the last i quantifiers • (*) we write: xL iff y1 s.t. (x,y1)Liwhere:(x’,y’)Li iff y2…Qi+1yi+1:(x’,y’,y2…,yi+1)RL

  42. PH def equivalence: Li1i • RLiis polynomially bounded and polynomial-time recognizable (as RL is) • xLi iff y1…Qi+1yi:(x,y1…,yi)Rli • xco-Li iff y1…Qiyi:(x,y1…,yi)RLi • Therefore, co-Li2i, soLi2i • By the inductive hypothesis, 2i1i so we have Li1i

  43. PH def equivalence: L1i+1 • A TMM in NPi can check the claim (*) by guessing the value of y1and using the oracle for Li • Therefore L1i+1

  44. PH def equivalent (side 2) • We prove 1i 2iby induction • Base as before on NP with same hypothesis • L1i+1 a NTM M s.t. LL(Mi) which meansL’1i s.t. L=L(ML’)

  45. PH def equivalent (3) L=L(ML’) means that: xL iff y1,q1,a1,…,qt,at s.tthe TM M accepts x with non-deterministic choices y receiving ai to oracle query qi: • (aj=1)  qjL’ • (aj=0)  qjL’

  46. PH def equivalent (4) • “y1” is a polynomial-time predicate • We assume L’i1 and by induction 1i2i  L’2i.Therefore for each question/answer we can write a relation RL’s.t: (aj=1)  y1(j,1)y2(j,1)…Qiyi(j,1)s.t (qj,y1(j,1),…,yi(j,1))  RL’ (aj=0)  y1(j,2) y2(j,2)…Qi+1yi(j,2)s.t (qj,y1(j,2),…,yi(j,2))  Co-RL’

  47. PH def equivalent (5) • Let j11,…,j1k be the indices for which aj=1 • Def: w1:=y q1 a1…qi ai y1(j11,1)…y1(j1k,1) w2:=y1(j01,2)…y1(j0i-k,2) y2(j11,1)…y2(j1k,1) wi:=yi-1(j01,2)…yi-1(j0i-k,2) yi(j11,1)…yi(j1k,1) wi+1:= yi (j01,2)…yi (j0i-k,2)

  48. PH def equivalent (?) • We can now define RLto be the (i+1)-ary relation (w1,…,wi+1)RL iff for all j(aj=1)(qj,y1(j,1),…,yi(j,1))RL’(aj=0)(qj,y1(j,2),…,yi(j,2))Co-RL’

  49. PH def equivalent (6) • Since both RL’and its complement are polynomially bounded and polynomial-time recognized we have: xL iff W1W2…Qi+1Wi+1s.t (w1,w2,…,wi+1)RLwhich is the definition of 2i+1

  50. ->9.2.1 Thm: PH  PSPACE Proof: • From the definition with quantifiers we get that xL iff y1y2y3..Qiyi (x,y1,…,yi)RL • Given x we can use i variables to try all combinations of assignments for y1…yi

More Related