49
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom

Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

Submitted by :

Estrella Eisenberg

Yair Kaufman

Ohad Lipsky

Riva Gonen Shalom

P/Poly

P/Poly is the class of Turing machines that accept external

“advice” in computation.

Formally - LP/Poly if there exists a polynomial time two-

input machine M and a sequence {an} of “advice” strings

|an| p(n) s.t

)(),(:}1,0{, xxaMxn Lnn

An alternative definition: 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:

This is called a non-uniform family of circuits.

)()(:}1,0{ xxCx Lnn

There is not necessarily a connection between the different

circuits.

Proof:

Circuit TM with advice:

– There exists a family of circuits {Cn} deciding L and |Cn| is poly- bounded.

– Given an input x, use a standard circuit encoding for C|x| as advice.

– The TM simulates the circuit and accepts/rejects accordingly.

Theorem:P/Poly definitions equivalence

TM with advice circuit:

– Similar to proof of Cook’s theorem build from M(an,) a circuit which for input x of length n outputs M(an,x).

– There exists a TM taking advice {an}.

– By running over all n’s a family of circuits is created from the advice strings.

Using P/Poly to decide P=NP

Claim: P P/poly - just use an empty advice.

If we find a language LNP and LP/Poly then we prove PNP.

P/Poly and NP both use an external string for computation.

How are they different?

The different between P/poly & NP

1.For a given n, P/poly has a universal witness aann as opposed to

NP where every x of length n may have a different witness.

2.In NP, for every xL, for every witness w M(x,w)=0. This is

not true for P/poly.

3.P/poly=co-P/poly, but we do not know if NP=co-NP.

The power of P/Poly

Theorem:Theorem: BPP BPP P/PolyP/Poly

ProofProof: : By simple amplification on BPP we get that for anyx{0,1}n, the probability for M to incorrectly decide x is < 2-n.

Reminder: In BPP, the computation uses a series r of poly(n)

coin tosses.

P/poly includes non-recursive languages

Example: All unary languages (subsets of {1}*) are in P/Poly - the

advice string can be exactly L(1n) and the machine checks if

the input is unary.

There are non-recursive unary languages:

Take {1index(1)| xL} where L is non-recursive.

Sparse Languages & Question

Definition: A language S is sparse if there exists a polynomial p(.) such that for every n, |S{0,1}n| p(n)

Theorem:NP P/Poly for every LNP, L is Cook reducible to a sparse language.

NPP?

In other words a language is sparse when there is a “small” number of words in each length, p(n) words of length n.

Example:Every unary language is sparse (p(n)=1)

Proof:It is enough to prove that SATP/Poly

SAT is Cook reducible to a sparse language.

By P/Poly definition, SATP/Poly says that there exists a series of advice strings {an} s.t. n |an| q(n). q(.)Poly and a polynomial Turing Machine M s.t. M(,an)=χSAT().

Definition: Sin=0i-110q(n)-I

S = {1n0Sin | n>0 where bit i of an is 1}

S is sparse since for every n |S{0,1}n+q(n)+1||an|q(n)

S is a list that have an element for each ‘1’ in the advices.

For each length we have maximum of all 1’s, so we’ll get |an| elements of length n+q(n)+1.

Cook-Reduction of SAT to S:

Input: of length n

Reconstruct an by q(n) queries to S.

[The queries are: 1n0Sin for 1 i q(n)].

Run M(,an) thereby solving SAT in polynomial time.

We solved SAT with a polynomial number of queries to an S-oracle means that it is Cook-reducible to the sparse language S.

Reconstruction is done bit by bit.

if 1n0SinS then bit i of an is 1.

[SATP/Poly SAT is Cook reducible to a sparse language.]

In order to prove that SATP/Poly we will construct a series of advice strings {an} and a deterministic polynomial time M that solves SAT using {an}.

SAT is Cook-reducible to sparse language S. Therefore, there exists an oracle machine MS which solves SAT in polynomial time t(.).

MS makes at most t(||) oracle queries of size t(||).

Construct an by concatenating all strings of length t(||) in S.

S is sparse There exists p(.)Poly s.t. n |S{0,1}n| p(n).

For every i there are at most p(i) elements of length i in S

|an| so an is polynomial in length.

Now, given an the oracle queries will be simulated by scanning an.

M will act as same as MS except that the oracle queries will be answered by an.

M is a deterministic polynomial time machine that using an solves SAT, therefore SATP/Poly.

|))(|(|)(|)( 2|)(|

1

tptipit

i

P=NP using the Karp-reductionTheoremP=NP iff for every language L NP, L is Karp-reducible to a

sparse language.

Proof: ()

P=NP Any L in NP is Karp-reducible to a sparse language.

L NP, we reduce it (Karp reduction) to {1} using the function :

otherwise

Lxxf

0

1)(

{1} is obviously a sparse language.

The reduction function f is polynomial, since it computes x L . L NP and we assume that P = NP, so computing L takes polynomial time.

The reduction is correct because x L iff f(x) {1}

( )

SAT is Karp-reducible to a sparse language P=NP

We prove a weaker claim ( even though this claim holds)

SAT is Karp-reducible to a guarded sparse language P=NP

Definition :

A sparse language S is guarded if there exists a sparse

language G , such that S G and G is in P.

For example, S= {1n0sni | n >0,where bit i of an is 1} is

guarded sparse by G= {1n0sni | n >0 and 0<i<=q(n) }.

Obviously, we can prove the theorem for SAT instead of

proving it for every L in NP . (SAT is NP-complete)

As Claimed, we have a Karp reduction from SAT to a

guarded sparse language S by f.

Input: A boolean formula =(x1,…,xn).

We build the assignment tree of by assigning at each level

another variable both ways (0,1).

Each node is labeled by its assignment.

Thus the leaves are labeled with n-bit string of all possible

assignments to .

the leaves have a full assignment , thus a boolean constant

value.

The tree assignment

1= (1,x2,…,xn)0= (0,x2,…,xn)

1110

10

00 01

iniini xxxx }1,0{),,,,(:),,( 111

We will solve by DFS search on the tree using branch and bound.The algorithm will backtrack from a node only if there is no satisfying assignment in its entire subtree.

At each node it will calculate x.:

S is the guarded sparse language of the reduction and G is the polynomial sparse language which S is guarded by. We also define :B G – S.

)( )(: SxSATfx

x is computed in polynomial time because Karp reduction is

polynomial time reduction.

B is well defined since S G.

Algorithm:

Input = (x1 , …,xn).

1. B = 2. Tree-Search()

3. In case the above call was not halted, reject as non satisfiable.

At first B is empty , we have no information on the part of S

in G.

We call the procedure Tree-Search for the first time with the

empty assignment.

Tree-Search () if ||=n //we’ve reached a leaf a full assignment

if True then output the assignment and halt. else return. if || < n

a. compute x=f()

b. if xG then return // xG ( xS SAT)

c. if xB then return //xB ( xG-S SAT)d. Tree-Search(1)

e. if xG add x to B //We backtracked from both sonsf. Tree-Search(0) g. return

x G Can be computed in poly-time because G is in P.

We backtrack (return in the recursion) when we know that

x S [ x B or x G ] hence there is no assignment that

starts with the partial assignment , so there is no use

expanding and building this assignment.

If we backtrack from both sons of we add x to the set

B G - S

CorrectnessIf is satisfiable we will find some satisfying assignment,

since for all nodes on the path from the root to a leaf xS

and we continue developing its sons.

When finding an assignment it is first checked to give TRUE

and only then returned.

The algorithm returns “no” if it has not found a satisfying

assignment and has backtracked from all possible sons.

Complexity analysis:If we visit a number of nodes equal to the number of strings

in G , the algorithm is polynomial , due to G’s sparseness.

It is needed to show that only a polynomial part of the tree is

developed.

Claim: Let and be different nodes in the tree such that neither is

an ancestor of the other and x = x . Then it is not possible

that the sons of both nodes were developed.

To prevent developing a certain part of the tree that does not

lead to a truth assignment over and over by different x s,

we maintain the set B which keeps x from which we have

backtracked.We do not develop a node whose x is in B.

Proof: W.l.o.g. we assume that we reach before . Since is not

an ancestor of , we arrive at after backtracking from . If

x G then x G since x= x and we will not develop

them both.

Otherwise, after backtracking from , x B thus x B so

we will not develop its sons.

Last point : Only polynomial part of the tree is developed.

Proof :G is sparse thus at each level of the tree there are at most p(n)

different such that xG , moreover every two different nodes on this level are not ancestors of each other. Therefore

by the previous claim the number of x developed from this level is bounded by p(n). The overall number of nodes developed is bounded by n •p(n).

Each level of the tree represents a different number of

variable needed to be assigned in the formula. In this length

there are polynomial number of items belonging to G since it

is a sparse language.

We have shown that with this algorithm, knowing that SAT is

Karp reducible to a guarded sparse language, we can solve

SAT in polynomial time SAT P P=NP